Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

intelsdi-x/snap-plugin-publisher-kairosdb

Repository files navigation

DISCONTINUATION OF PROJECT.

This project will no longer be maintained by Intel.

This project has been identified as having known security escapes.

Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.

Intel no longer accepts patches to this project.

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.

Snap publisher plugin - KairosDB

This plugin supports pushing metrics into an KairosDB instance.

It's used in the snap framework.

  1. Getting Started
  1. Documentation
  1. Community Support
  2. Contributing
  3. License
  4. Acknowledgements

Getting Started

System Requirements

Support Matrix

  • KairosDB V1 REST API

Operating systems

All OSs currently supported by snap:

  • Linux/amd64

Installation

Download the plugin binary:

You can get the pre-built binaries for your OS and architecture at plugin's GitHub Releases page.

To build the plugin binary:

Fork https://github.com/intelsdi-x/snap-plugin-publisher-kairosdb

Clone repo into $GOPATH/src/github.com/intelsdi-x/:

$ git clone https://github.com/<yourGithubID>/snap-plugin-publisher-kairosdb.git

Build the plugin by running make within the cloned repo:

$ make

This builds the plugin in ./build

Configuration and Usage

Documentation

For details on KairosDB, please refer to documentation.

Task manifest

Task manifest configuration is described in snap's documentation. In order to use KairosDB publisher you have to add section "publish" then specify following options:

  • "host" - KairosDB host address (ex. "127.0.0.1")
  • "port" - KairosDB REST API port (ex. "8083")
  • "useDynamic" - Use dynamic elements of namespace as tags for metric (ex. true)

To know more about Dynamic Metric Namespace, please refer to snap's documentation

See example task manifest in examples/tasks/.

Examples

Example of running psutil collector plugin and publishing data to KairosDB.

Sample useDynamic=false

metric tags value
/intel/psutil/cpu/0/user plugin_running_on=host1 12
/intel/psutil/cpu/1/user plugin_running_on=host1 42

Sample useDynamic=true

metric tags value
/intel/psutil/cpu/user host=host1 cpu_id=0 plugin_running_on=host1 12
/intel/psutil/cpu/user host=host1 cpu_id=1 plugin_running_on=host1 42

Another example of running psutil collector plugin and publishing data to KairosDB.

Set up the Snap framework

Ensure Snap daemon is running:

  • initd: service snap-telemetry start
  • systemd: systemctl start snap-telemetry
  • command line: sudo snapteld -l 1 -t 0 &

Download and load Snap plugins (paths to binary files for Linux/amd64):

$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-publisher-kairosdb/latest/linux/x86_64/snap-plugin-publisher-kairosdb
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-collector-psutil/latest/linux/x86_64/snap-plugin-collector-psutil
$ snaptel plugin load snap-plugin-publisher-kairosdb
$ snaptel plugin load snap-plugin-collector-psutil

Create a task manifest (see exemplary tasks), for example psutil-kairosdb.json with following content:

{
  "version": 1,
  "schedule": {
    "type": "simple",
    "interval": "1s"
  },
  "workflow": {
    "collect": {
      "metrics": {
        "/intel/psutil/load/load1": {},
        "/intel/psutil/load/load15": {}
      },
      "publish": [
        {
          "plugin_name": "kairos",
          "config": {
           "host": "127.0.0.1",
           "port": 8080,
           "useDynamic": true
          }
        }
      ]
    }
  }
}

Create a task:

$ snaptel task create -t psutil-kairosdb.json

Watch created task:

$ snaptel task watch <task_id>

To stop previously created task:

$ snaptel task stop <task_id>

Roadmap

  • alternative publishing method via telnet
  • alternative publishing method via Graphite protocol

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 or visit snap Gitter 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.

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

License

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

Acknowledgements