Now that we have installed Icinga2 and used it to monitor Linux and Windows nodes we take a little closer look at Icinga Webserver 2.

When we take a look at our Windows server 2016 node we see a couple of services.

We see that most services are within acceptable ranges. But this is only interesting when you want to check the real time situation. What if we wanted to see how these services perform over time? Then we need some sort of graph/chart.

Installing Graphite

For these situations Icinga2 has a module called Graphite. It is really easy to install on the Icinga2 Master. Let’s do that now.

First we need to add the debmon sources to get the dependencies with apt-get.

Icinga2 Graphite module needs… yes… Graphite!

Graphite needs other packages too but we already installed these in part 1. We also need to enable the graphite module in Icinga2.

We need to create a database for graphite. Don’t create a Django superuser.

Graphite needs Apache to output its charts. Learn more about Graphite here. For simplicity we install Graphite on the Icinga2 master on port 8000.

Add: Listen 8000 (leave 80 for the Icinga2 webserver)

Add: <Virtualhost *:8000>

The Graphite website is now available at: http://[ip-icinga2-master]:8000/

Installing Icinga2 Graphite module

Now that Graphite has been setup, we need to download and add the Icinga2 Graphite module. Icinga2 modules are stored in: /usr/share/icingaweb2/modules

If you don’t have Git, install it with: apt-get install git.

We only have to configure the module to point to our Graphite webserver, which is in our case the same host (local-host). Don’t forget adding the question mark to the render url!

The standard Graphite configuration at /etc/icinga2/features-enabled/graphite.conf is good.

We only need Carbon. Carbon is one of the components of Graphite, and is responsible for receiving metrics over the network and writing them down to disk using a storage backend. Its acts like a cache in memory and writes the metrics to disk at certain periods to alleviate disk usage.

We need to tell Carbon what the data-retention will be on the Icinga2 metrics. Icinga2 documentation has the following suggestion:

After altering the configuration we need to restart the carbon deamon:

Make sure the Graphite module is enabled in the Icinga2 webserver (Configuration -> Module -> Graphite -> enable)

Conclusion

We now have installed Graphite and by doing so making Icinga2 much more useful. In the last part we are taking a look at custom dashboards for Icinga2 using Dashing. It can be used to setup a monitor or big TV in the office for real-time network information.