check_graphite is a nagios module to query graphite
check_graphite -H 'http://my.graphite.host
check_graphite -H "http://your.graphite.host/render" -M collectd.somebox.load.load.midterm -w 1 -c 2 -N load WARNING|load=1.4400000000000002;;;;
check_graphite accepts the following options:
-H
or--endpoint
: the graphite HTTP endpoint which can be queried-M' or
--metric`: the metric expression which will be queried, it can be an expression-F
or--from
: time frame for which to query metrics, defaults to "30seconds"-N
or--name
: name to give to the metric, defaults to "value"-U
or--username
: username used for basic authentication-P
or--password
: password used for basic authentication-w
: warning threshold for the metric-c
: critical threshold for the metric-t
: timeout after which the metric should be considered unknown--nulls
: how to handle null data from graphite, either "unknown" or "critical", defaults to "unknown"
check_graphite, asks for a small window of metrics, and computes an average over the last valid points collected, it then checks the value against supplied thresholds. Thresholds are expressed in the format given in The Nagios Developer Guidelines.
NaN values are not taken into account in the average
To setup your machine for hacking on check-graphite
:
- install ruby1.9.1 or higher
- install ruby gems
- clone this repo
gem build check_graphite.gemspec
- make a.gem
file from the local sourcegem install check_graphite --development
- install the newly created .gem, and fetch all dependencies from the internetgem install bundler
- run
rake
to run the test suite