Search code examples
graphiteicingaicinga2graphite-carbon

Reading Graphite events from Icinga2


In our lab we are currently using two systems to remotely monitor sensitive quantities etc. :

  • Icinga2, as a monitoring system that reads data from a logging DAQ called Watchdog and creates alarms when measured values exceed user-defined thresholds;

  • Graphite to plot data from Carbon, where it had been received via network or otherwise (saved on disk) and stored, onto a webpage so as to be accessible remotely.

So far we have only been able to have Icinga2 write whatever it received on Graphite, so that we can see it.

Is it possible to have Icinga2 read from Graphite?
There are other programs that are writing things to the Graphite directly, and that cannot go through the DAQ Watchdog to be read from Icinga (lack of ports).
Ideally we would like to create alarms (that Icinga2 can do) on whatever reaches the Graphite.


Solution

  • I think I found a solution in the end: as a part of the Graphite package installation there is the Whisper database. This inclues a number of useful scripts, like whisper-fetch.py which allows to exctract data from the .wsp file (where the plotted graphite-web is stored) to any format we want.

    One just needs to check that the whole Whisper package has been installed, which can be done just by checking whether import whisper on a python terminal does not return an error. If not fully installed, checkout the whisper on GitHub.