Sign inSign up

weevenetwork/slack-alert

By weevenetwork

Updated over 3 years ago

Slack Alert is an alerting module sending notifications to Slack channels when triggered.

Image
0

1.5K

weevenetwork/slack-alert repository overview

Slack Alert

nameSlack Alert
GitHubweeve-modules/slack-alert
authorsJakub Grzelak, Paul Gaiduk

Table of Content


Description

Slack Alert is an alerting module responsible for sending notifications to Slack channels when triggered. This module is containerized using Docker.

Sample Notifications

TypeText
warningWARNING for MachineName! Temperature reading shows 41.19 Celsius.
alarmingALARM from MachineName! Detected an alarming reading of Temperature: 100 Celsius.
cautionCAUTION for MachineName! Temperature is 100 Celsius.
brokenBROKEN device MachineName! Detected Temperature reading is -1.1 Celsius.

Module Variables

The following module configurations can be provided in a data service designer section on weeve platform:

Environment VariablestypeDescription
INPUT_LABELstringThe field to apply alert on, i.e: "temperature"
INPUT_UNITstringI.e: "Celsius"
ALERT_SEVERITYstringAlert type: warning, alarming, caution, broken
ALERT_MESSAGEstringUse string interpolation format to get required field in the alert message -> {{label}}, {{value}}, {{unit}}, {{alert_severity}}, {{device_name}} and {{time}}
SLACK_WEBHOOK_URLstringWebhook to the slack channel to put alerts on, format: 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX'
MODULE_NAMEstringName of the module
MODULE_TYPEstringType of the module (Input, Processing, Output)
LOG_LEVELstringAllowed log levels: DEBUG, INFO, WARNING, ERROR, CRITICAL. Refer to logging package documentation.
INGRESS_HOSTstringHost to which data will be received
INGRESS_PORTstringPort to which data will be received

Dependencies

The following are module dependencies:

  • bottle
  • requests

Input

Input to this module is JSON body single object:

Example:

{
  temperature: 15
}

Output

This module does not produce any output except Slack notifications.

Tag summary

Content type

Image

Digest

sha256:d7f22e7ee

Size

48.5 MB

Last updated

over 3 years ago

docker pull weevenetwork/slack-alert:v2.0.0