RevelationOnline/monitor-it

Name: monitor-it

Owner: RevelationOnline

Description: Simple YAML & Graphite based monitoring script that notifies via NMA

Created: 2015-05-31 15:15:09.0

Updated: 2015-05-31 15:15:23.0

Pushed: 2015-05-31 15:38:42.0

Homepage: null

Size: 469

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

monitor-it

Simple YAML & Graphite based monitoring script that notifies via NMA

Configuration

Currently only the Graphite metric source is implemented. You can see an example configuration in config.yaml.

Metrics

The basic principle on how to configure a new metric is this:

ics:
u:
graphite:
  host: http://mygraphiteserver/graph/
  query: server.cpu_usage

This will make the variable “cpu” available to be used in your rules.

Rules

A simple rule that alerts if the cpu usage is above 60% works like this:

s:
u_usage_high:
if: cpu > 60
message: "CPU usage is above 60% ({{cpu}}"
can optionally set the ```urgency``` attribute which will be passed on to the notifications.

otifications

notifications: NMA: # name of the notification, currently not used. Should be unique thought notify_my_android: # notification type, currently the only implemented one

 tokens: [ 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ] # list of tokens to notify
 application: 'Revelation Online Status' # application var of NMA
 event: 'Issue' # even var of NMA
 description: '{% for (urgency, message) in messages %}{{message}}
 {%endfor%}' # abitrary jinja2 template, messages is a tuple of the urgency and message generated by rules
 url: 'http://graphite.rammhold.de/tessera/dashboards/6/revelation?from=-1h' # url to pass along with the notification, usually some way for the notified person to react/confirm the reported issue
reenshot
reenshot](/example.png?raw=true)

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.