This plugin supports pushing metrics to Slack via webhooks.
It's used in the Snap framework.
- golang 1.6+ (needed only for building)
Fork https://github.com/marcin-krolik/snap-plugin-publisher-slack
Clone repo into $GOPATH/src/
:
$ git clone https://github.com/<yourGithubID>/snap-plugin-publisher-slack.git
Build the plugin by running make within the cloned repo:
$ make
This builds the plugin in ./build
- Set up the Snap framework
The plugin expects you to provide the following parameters:
webhook
eg.https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
more @ Slack WebApipublish_fields
eg."Namespace|Config|Data|Description|Timestamp|Unit|Version"
(optional)channel
username
(optional)
Example of using snap-plugin-publisher-slack to store metrics collected by snap-plugin-colector-psutil. Make sure you have access to Slack and set up incoming webhook integration
Ensure Snap daemon is running:
$ snapteld -l -t 0 &
Download and load Snap plugins:
$ snaptel plugin load snap-plugin-collector-psutil
$ snaptel plugin load snap-plugin-publisher-slack
Create a task:
$ snaptel task create -t psutil-slack.yml
Using task manifest to create task
Task created
ID: 3b2bc29c-8256-4ca0-a958-05f5d41f6f11
Name: Task-3b2bc29c-8256-4ca0-a958-05f5d41f6f11
State: Running
You may view example tasks here.
Ensure the task is running and collecting metrics:
$ snaptel task watch 3b2bc29c-8256-4ca0-a958-05f5d41f6f11
There isn't a current roadmap for this plugin. 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.
- Author: Marcin Krolik