Skip to content

marcin-krolik/snap-plugin-publisher-slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snap publisher plugin - Slack

This plugin supports pushing metrics to Slack via webhooks.

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

To build the plugin binary:

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

Configuration and Usage

Documentation

The plugin expects you to provide the following parameters:

  • webhook eg. https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX more @ Slack WebApi
  • publish_fields eg. "Namespace|Config|Data|Description|Timestamp|Unit|Version" (optional)
  • channel
  • username (optional)

Examples

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

Roadmap

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.

Acknowledgements

About

Publishes Snap metrics to Slack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published