Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amwelch/hubot-influxdb-alerts
Create and manage alerts in your chatroom using hubot and influxdb
https://github.com/amwelch/hubot-influxdb-alerts
Last synced: 2 months ago
JSON representation
Create and manage alerts in your chatroom using hubot and influxdb
- Host: GitHub
- URL: https://github.com/amwelch/hubot-influxdb-alerts
- Owner: amwelch
- License: mit
- Created: 2015-03-01T00:41:54.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-17T02:47:14.000Z (about 9 years ago)
- Last Synced: 2024-04-13T23:54:52.536Z (9 months ago)
- Language: CoffeeScript
- Size: 27.3 KB
- Stars: 10
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-influxdb - hubot-influxdb-alerts - Create and manage alerts in your chatroom using [hubot](https://hubot.github.com/) and influxdb (Consuming data from InfluxDB / Other tools)
README
[![npm version](https://badge.fury.io/js/hubot-influxdb-alerts.svg)](http://badge.fury.io/js/hubot-influxdb-alerts)
# hubot-influxdb-alerts
Create and manage alerts in your chatroom using hubot and influxdb
Runs pre-set influxdb queries periodically. If any queries return a result each row generates a seperate alert into chat.##Configuration
The following options can be set as environment variables:
#Required
HUBOT_INFLUXALERTS_AUTO_ALERT_ROOM #the chat room to post alerts to
#Optional
HUBOT_INFLUXALERTS_HOURS_BEFORE_REPOST #Hours between posting an unclaimed alert. Default: 3
HUBOT_INFLUX_ALERTS_HOURS_BEFORE_ACK_REPOST #Hours between posting a claimed alert: Default 12
HUBOT_INFLUX_ALERT_CHECK_INTERVAL #Time in ms between running the queries 60000The rest of the config is handled in a json file in config/hubot-influx-config.json in the project directory
Authenticate with influxdb
{
"connection": {
"username": "foo-user",
"password": "bar-password",
"host": "localhost",
"port": "8086"
},
"default_database": "my-database", #if database is not specified in query config use thisRegister queries
"queries": {
"my-database": {This query will only run when a user calls influx run test-no-alert. It will not generate any alerts
"test-no-alert": {
"query": "SOMEINFLUXDBQUERY"
},This query is run as part of the alert suite. For each row "template" is written to chat with the template variables
filled in using the columns in "columns"."test-alert": {
"query": "select firstname,lastname from foo",
"alert": true,
"alert_msg": {
"template": "Danger, {0} {1} everything is broken",
"columns": ["firstname", "lastname"]
}
}
}
}
}##Commands
influx alerts {off|on} #Manually toggle alerts on or off
influx show #Show Available Queries
influx run QUERY_NAME #Run a query
influx alerts check #Run all the alert queries
influx claim ID #Claim an alert##Author
Alexander Welch
##License
MIT