Icinga Web Module for Performance Data Graphs

8 May, 2025

Markus Opolka
Markus Opolka
Senior Consultant

Markus war nach seiner Ausbildung als Fachinformatiker mehrere Jahre als Systemadministrator tätig und hat währenddessen ein Master-Studium Linguistik an der FAU absolviert. Seit 2022 ist er bei NETWAYS als Consultant tätig. Hier kümmert er sich um die Themen Container, Kubernetes, Puppet und Ansible. Privat findet man ihn auf dem Fahrrad, dem Sofa oder auf GitHub.

by | May 8, 2025

After we forked the Grafana module for Icinga Web last year, we thought about whether there are other ways to graphically display Icinga performance data on the web. Running a Grafana instance alongside Icinga just for rendering graphs is a lot of effort and additional operational complexity, no matter how great you think Grafana is. In addition, the installation of the grafana-image-renderer is not always trivial. So we took a closer look at the topic and tried to create an Icinga Web module that addresses these problems.

The result is the Icinga Web module for Performance Data Graphs. This new module is easy to install and renders graphs for performance data directly in the browser. No additional software is required!

How does the whole thing work?

There are actually several modules behind the new Icinga Web module that take care of two aspects.

  • A “frontend” module that is responsible for rendering the fancy graphs
  • And a “backend” module that fetches and processes the data

We decided to write several small backend modules instead of one large module that can address all possible data sources. There is therefore one module and one central front-end module for each data source (Graphite, InfluxDB, Elasticsearch, etc.).

This has the advantage that you can concentrate on one task in the individual module and you don’t have to worry about changes having a negative impact on other data sources. The separation of rendering and data retrieval also allows you to easily implement additional data sources or adapt existing ones to your own requirements.

The entire code is freely available under a GPL 2.0 license. We currently have a backend implementation for InfluxDBv1, InfluxDBv2 and Graphite. Elasticsearch and OpenSearch are still pending. If anyone has a need, we are of course always happy to receive sponsorship in the form of a commission or open source code.

How do you install and configure everything?

First install and activate the central frontend module and one of the data source modules, depending on which writer you use in Icinga.

git clone https://github.com/NETWAYS/icingaweb2-module-perfdatagraphs.git /usr/share/icingaweb2/modules/perfdatagraphs

git clone https://github.com/NETWAYS/icingaweb2-module-perfdatagraphs-graphite.git /usr/share/icingaweb2/modules/perfdatagraphsgraphite

icingacli module enable perfdatagraphs
icingacli module enable perfdatagraphsgraphite

The data source must then be configured, either in the browser via the module configuration or directly in the INI file:

cat /etc/icingaweb2/modules/perfdatagraphsgraphite/config.ini 
[graphite]
api_url = "https://graphite.netways.de:8081"
api_username = "markus"
api_password = "******"
api_timeout = "5"

If both modules are activated, graphs for hosts and services are automatically displayed. A graph is currently generated for each performance data time series. The reason for this is that the amount of data for a single plugin can vary greatly. This means that one metric can have two digits and the other only fractions.

Icinga custom variables can be used to customize graphs as required. For example, certain metrics can be included or removed. You can also move the “most important” graph to the first position and display all others with one click.

apply Service "icinga" {
  vars.perfdatagraphs_config_metrics_include = ["uptime", "*_latency"]
  vars.perfdatagraphs_config_metrics_exclude = ["avg_latency"]

  vars.perfdatagraphs_config_highlight = "max_latency"
}

One feature we are still working on is the automatic conversion of units. The unit of a metric can be specified via a variable, this text is then displayed in the graph and some trigger functions for the conversion (bytes, seconds, percentage, etc.).

apply Service "ping6" {
  vars.perfdatagraphs_metrics["pl"] = {
    unit = "percentage"
  }
  vars.perfdatagraphs_metrics["rta"] = {
    unit = "seconds"
  }
}

Of course, graphs can also be completely deactivated:

apply Service "ping4" {
  vars.perfdatagraphs_config_disable = true
}

The module is still very new and there are still many things we would like to improve, but along the way we want everyone to benefit. So give it a try. The whole thing should not and cannot replace Grafana, of course – Grafana is far too cool for that. It is only intended to be an easy-to-install and simple solution for performance data graphs in Icinga Web, whose data can be reused in Grafana if required.

We welcome feedback and pull requests on GitHub.

If you are interested in sponsoring or help with the new, stylish graph, you are welcome to contact our outsourcing or sales team.

Events

Training courses

Professional Services

Web Services

How did you like our article?