Simple Threshold Trigger¶
Let’s say you measure how much free space is left on your HDD and store this value as
DevOps.my_server.hdd.freespace_mbytes in Graphite. Maybe you want to get an email when you have
less than 50 GB left (it’s not a big problem), and a Pushover notification when you have less than
1 GB left (you really need to delete something asap).
You can easily accomplish this by adding a trigger in Moira’s Simple Mode:
You can specify a single metric like we did here:
You can also specify multiple metrics like
DevOps.*.hdd.freespace_mbytes. All metrics will be monitored separately,
and you will get separate notifications for each metric.
You can even use Graphite functions like
Moira understands everything that Graphite itself understands. See appropriate documentation.
In simple mode you need to specify two threshold values: WARNING and ERROR. Note that Moira will automatically switch to raising or falling mode according to these settings. In our example, warning threshold is greater than error threshold. In this case, Moira will consider any value less than 50000 a warning and less than 1000 an error, which is what we want. In other cases, you may need to consider large values a problem - then you should make error threshold greater than warning.