snap collector plugin - snapstats
This plugin collects metrics from Snap itself. It is quite simple so far and just collects some counts for all tasks.
It's used in the snap framework.
- golang 1.5+ (needed only for building)
To build the plugin binary:
Clone repo into
$ git clone https://github.com/<yourGithubID>/snap-plugin-collector-snapstats.git
Build the plugin by running make within the cloned repo:
This builds the plugin in
Uses govendor to manage dependencies.
Configuration and Usage
- Set up the snap framework
This plugin has the ability to gather the following metrics:
|/grafanalabs/snapstats/tasks/state/Disabled/count||Total number of disabled Snap tasks|
|/grafanalabs/snapstats/tasks/state/Running/count||Total number of Running Snap tasks|
|/grafanalabs/snapstats/tasks/state/Stopped/count||Total number of Stopped Snap tasks|
|/grafanalabs/snapstats/tasks/hitcount||Total sum of the all the snap tasks' hit counts|
|/grafanalabs/snapstats/tasks/failedcount||Total sum of the all the snap tasks' failed counts|
There is an example task in the examples directory.
It has one config variable that is required - snap-url
For most users, this value should be
http://localhost:8181. It is mandatory that the url starts with the http or https protocol.
Hopefully, Intel will be releasing a more complete lib that will make this obsolete.
This plugin is released under the Apache 2.0 License.
- Author: @daniellee