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.
Snap-relay is a streaming Snap plugin that starts listeners for collecting metrics from statsd and/or collectd. Received metrics are dispatched to the Snap framework with the namespaces /intel/relay/statsd
and /intel/relay/collectd
respectively.
It's used in the Snap framework.
- golang 1.7+ - needed only for building
All OSs currently supported by plugin:
- Linux/amd64
- Darwin/amd64
You can get the pre-built binaries for your OS and architecture at Snap's GitHub Releases page. Download the plugins package from the latest release, unzip and store in a path you want snapteld
to access.
Fork https://github.com/intelsdi-x/snap-relay
Clone repo into $GOPATH/src/github.com/intelsdi-x/
:
$ git clone https://github.com/<yourGithubID>/snap-relay.git
Build the plugin by running make within the cloned repo:
$ make
This builds the plugin in /build/$GOOS/$GOARCH
- Set up the Snap framework
- Load the plugin and create a task, see example in Examples.
The snap-relay plugin allows access to any metric that is exposed by
- Collectd running with graphite backend (see the collectd write_graphite plugin for more details)
- Statsd running with repeater backend (see the statsd supported backends for more details)
Requests can be made in a Snap task manifest for:
/intel/relay/collectd
/intel/relay/statsd
The following examples show how to stream metrics from collectd (running with Graphite as the backend) into Snap workflow.
Details can be found in docker-compose example folder.
This example demonstrates running the relay collector plugin and writing to a file using file publisher plugin.
In one terminal window, start the Snap daemon (in this case with logging set to 1 and trust disabled):
$ snapteld -l 1 -t 0
There are two ways of loading plugins: normally which uses the plugin's binary, and remotely which is available when you run the plugin in stand-alone mode. Below we will demonstrate both ways.
To load snap-relay plugin in stand-alone mode you must first start the plugin. In another terminal window navigate to your local copy of the snap-relay repository and start the plugin binary with flag --stand-alone
. To define the port on which your plugin is listening, use option --stand-alone-port
, by default it is 8182.
$ snap-relay --stand-alone --stand-alone-port 8182
Open another terminal and load the plugin remotely by using the hostname and port where the stand-alone plugin is running:
$ snaptel plugin load http://localhost:8182
Next, we will load the file plugin by using the binary. We must first get the appropriate version for Linux or Darwin:
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-publisher-file/latest/linux/x86_64/snap-plugin-publisher-file
or
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-publisher-file/latest/darwin/x86_64/snap-plugin-publisher-file
Load the file plugin for publishing:
$ snaptel plugin load snap-plugin-publisher-file
Create a task manifest (see exemplary files)
---
version: 1
schedule:
type: "streaming"
workflow:
collect:
metrics:
/intel/relay/collectd: {}
publish:
-
plugin_name: "file"
config:
file: "/tmp/published_relay.log"
Create a task:
$ snaptel task create -t /examples/tasks/collectd.yml
Stream data from Graphite. The default port is 6124
. Do this a few times:
$ echo "test.first 13 `date +%s`"|nc -u -c localhost 6124
See the results:
$ cat /tmp/published_relay.log
There isn't a current roadmap for this plugin, but it is in active development. As we launch this plugin, we do not have any outstanding requirements for the next release. If you have a feature request, please add it as an issue and/or submit a pull request.
If you have a feature request, please add it as an issue.
This repository is one of many plugins in Snap, a powerful telemetry framework. The full project is at http://github.com/intelsdi-x/snap. To reach out on other use cases, visit Slack.
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.
Snap, along with this plugin, is an Open Source software released under the Apache 2.0 License.
- Author: Kelly Lyon