Wrapper to gather telemetry data from Diamond plugins
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
examples
scripts
snap_diamond
tests
.gitattributes
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE
MANIFEST.in
Makefile
README.md
README.rst
requirements.txt
setup.cfg
setup.py
test-requirements.txt
tox.ini
versioneer.py

README.md

DISCONTINUATION OF PROJECT

This project will no longer be maintained by Intel. Intel will not provide or guarantee development of or support for this project, including but not limited to, maintenance, bug fixes, new releases or updates. Patches to this project are no longer accepted by Intel. If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the community, please create your own fork of the project.

Join the chat on Slack

A Snap collector that wraps existing Diamond collectors

Diamond is a Python daemon that collects metrics. This snap plugin wraps Diamond plugins so they can be easily consumed by Snap.

  1. Getting started
  1. Roadmap
  2. Community support
  3. Contributing
  4. License
  5. Acknowledgements

Getting started

System requirements

  • Python2 (>=2.7)
  • Linux
  • Required if building the the plugin package
  • Required for testing plugin
    • tox (install using pip install tox)

Installation

Download

You can get the pre-built plugin package for Linux (x86-64) here.

To package the plugin

You will need to be on Linux with Python 2.7 or Python3 and a virtualenv activated.

To build package with virtual environment included you will need pyenv installed on your system.

Just run the make pkg command to build ACI package. Package file will be available under "dist" folder.

NOTE: If you got Snap error "received metric with bad version" during development (after adding some commits), run "git tag -af <YOUR_VERSION> -m <VERSION_INFO>" or just "git tag -f <YOUR_VERSION>" to update version tag, and rebuild package. Plugin version is gathered from git tags.

Example

Start snapteld

Before the plugin can be loaded a global config entry for 'diamond' under collectors needs to be present with entries for 'collectors_path' and 'config'. Below is an example (diamond.yml) config:

---
    control:
    plugins:
        collector:
        diamond:
            versions:
            1:
                collectors_path: "/etc/diamond/collectors"
                config: |
                    {"collectors":{
                            "PingCollector": {"target_google": "8.8.8.8",
                                            "target_grafana": "grafana.net",
                                            "bin": "/bin/ping"},
                            "CPUCollector": {},
                            "DiskUsageCollector": {},
                            "MemoryCollector": {},
                            "IPCollector": {},
                            "VMStatCollector": {}
                    }}

To start snapteld with the above config: snapteld -t 0 -l 1 --config diamond.yml

Load the plugin

You can download the plugin package [here](http://snap.ci.snap-telemetry.io/\ plugins/snap-plugin-collector-diamond/latest/linux/x86_64/snap-plugin
-collector-diamond.aci). You can find more information on snap plugin packaging [here](https://github.com/intelsdi-x/snap/blob/master/docs/\ PLUGIN_PACKAGING.md) and [here](https://intelsdi-x.github.io/snap-plugin-lib-\ py/plugin_authoring/packaging.html).

snaptel plugin load snap-plugin-collector-diamond.aci

An alternative approach would be to load the snap_diamond.py file however this would require that the Python environment available to the user running snapteld has all dependencies installed to it.

Start a task

After starting snapteld and loading the plugin we will load the following task.

---
  version: 1
  schedule:
    type: "simple"
    interval: "1s"
  workflow:
    collect:
      metrics:
        /diamond/*: {}

snaptel task create -t examples/tasks/all.yml

task

Roadmap

There isn't a current roadmap for this plugin. However, if additional output types are wanted, please open an issue or submit a pull request as mentioned below.

If you have a feature request, please add it as an issue and/or submit a pull request.

Community Support

This repository is one of many plugins in Snap, a powerful telemetry framework. See the full project at http://github.com/intelsdi-x/snap To reach out to other users, head to the main framework.

Join our Slack channel.

Contributing

We love contributions!

There's more than one way to give back, from examples to blogs to code updates. See our recommended process in CONTRIBUTING.md.

Our code of conduct can be found here.

License

Snap, along with this plugin, is an Open Source software released under the Apache 2.0 License.

Acknowledgements

Original code from the Snap repo.

Additional code written by:

And thank you! Your contribution, through code and participation, is incredibly important to us.