Icingaweb2 Graphite integration

Icingaweb2 Graphite integration

Icingaweb2 Graphite integration

When you have Graphite/Grafana installation in place with your Icinga2 dashboards, you may want to integrate graphs to IcingaWeb2 pages. It allows to see state chages in dynamic.

You need to install Icingaweb2 module https://github.com/findmypast/icingaweb2-module-graphite to folder /usr/share/icingaweb2/modules/graphite

Create configuration file inĀ /etc/icingaweb2/modules/graphite/config.ini

[graphite]
metric_prefix = icinga
base_url = http://yourgraphite.yourdomain.com/render?

You have to specify correct base url to Graphite-Web installation as it is a source of all graphs. Refer to Grafana data source page if you have already installed it.

As our Graphite uses dark theme by default, the background of graphs was black on white in Icingaweb2 dashboard. It is possible to change colors in configuration variables graphite_args_template (for small graphs) and graphite_large_args_template (for full page graphs). So final config.ini looks like this

[graphite]
metric_prefix = icinga
base_url = http://yourgraphite.yourdomain.com/render?
graphite_args_template = '&target=$target$&source=0&width=300&height=120&hideAxes=false&lineWidth=2&hideLegend=true&colorList=049BAF&bgcolor=white&fgcolor=black'
graphite_large_args_template = '&target=$target$&source=0&width=800&height=700&colorList=049BAF&lineMode=connected&bgcolor=white&fgcolor=black'

Go to Configuration -> Modules -> graphite and enable the module.

If you have any questions or need a Icinga2 support, feel free to contact our team.