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.
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 plugin intended to detect changes in metrics
It's used in the Snap framework.
- golang 1.7+ (needed only for building)
All OSs currently supported by snap:
- Linux/amd64
- Darwin/amd64
You can get the pre-built binaries for your OS and architecture under the plugin's release page. For Snap, check here.
Fork https://github.com/intelsdi-x/snap-plugin-processor-change-detector
Clone repo into $GOPATH/src/github.com/intelsdi-x/
:
$ git clone https://github.com/<yourGithubID>/snap-plugin-processor-change-detector.git
Build the plugin by running make within the cloned repo:
$ make
This builds the plugin in ./build/
- Set up the Snap framework
The intention of this plugin is to detect changes between current and previous values of metrics. Current value of metric is set as a metric's data, previous value of metric is saved in tag for metric.
The plugin can be configured by following parameters:
rules
- regular expressions which are used to select metrics in which changes need to be detected, regular expressions are separeted by|
.
Notice: Special characters in regular expressions needs to be escaped.
In this example we run CPU collector, change detector processor and file publisher to write data into file.
Documentation for Snap collector cpu plugin can be found here.
In one terminal window, open the snap daemon with log level 1 (-l 1
) and disabled plugin signing check (-t 0
):
$ snapteld -t 0 -l 1
In another terminal window:
Download and load collector, processor and publisher plugins
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-collector-cpu/latest/linux/x86_64/snap-plugin-collector-cpu
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-processor-change-detector/latest/linux/x86_64/snap-plugin-processor-change-detector
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-publisher-file/latest/linux/x86_64/snap-plugin-publisher-file
$ chmod 755 snap-plugin-*
$ snaptel plugin load snap-plugin-collector-cpu
$ snaptel plugin load snap-plugin-processor-change-detector
$ snaptel plugin load snap-plugin-publisher-file
See available metrics for your system
$ snaptel metric list
Create a task file - see examplary task manifests in examples/tasks:
---
version: 1
schedule:
type: "simple"
interval: "1s"
max-failures: 10
workflow:
collect:
metrics:
/intel/procfs/cpu/*/utilization_percentage: {}
process:
- plugin_name: "change-detector"
config:
rules : "/intel/procfs/cpu/.*/utilization_percentage"
publish:
- plugin_name: "file"
config:
file: "/tmp/cpu_change_detector.log"
Start task:
$ snaptel task create -t task.yaml
This data is published to a file /tmp/cpu_change_detector.log
To stop task:
$ snaptel task stop <task id>
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.
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
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.
Snap, along with this plugin, is an Open Source software released under the Apache 2.0 License.
- Author: Katarzyna Kujawa
And thank you! Your contribution, through code and participation, is incredibly important to us.