Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

metrics:
  cpu:
    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:

rules:
  cpu_usage_high:
    if: cpu > 60
    message: "CPU usage is above 60% ({{cpu}}"

message is any valid jinja2 template, all metric are available in the template, no matter which one was used in the if: block. Additionally the variable rule_name is available. You can optionally set the urgency attribute which will be passed on to the notifications.

Notifications

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

Screenshot

Screenshot

About

Simple YAML & Graphite based monitoring script that notifies via NMA

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages