Get social

Search Exchange

Recently updated

Most downloaded

Grafana Module


Grafana Module for Icinga Web 2

Table of Contents

  1. About
  2. License
  3. Support
  4. Requirements
  5. Installation
  6. Configuration
  7. FAQ
  8. Thanks
  9. Contributing


Add Grafana graphs into Icinga Web 2 to display performance metrics.

Icinga Web 2 Grafana IntegrationIcinga Web 2 Grafana Integration


Icinga Web 2 and this Icinga Web 2 module are licensed under the terms of the GNU General Public License Version 2, you will find a copy of this license in the LICENSE file included in the source package.


Join the Icinga community channels for questions.



Extract this module to your Icinga Web 2 modules directory as grafana directory.

Git clone:

cd /usr/share/icingaweb2/modules
git clone grafana

Tarball download (latest release):

cd /usr/share/icingaweb2/modules
mv icingaweb2-module-grafana-1.1.0 grafana

Enable the module in the Icinga Web 2 frontend in Configuration -> Modules -> grafana -> enable. You can also enable the module by using the icingacli command:

icingacli module enable grafana

Grafana Preparations

Enable basic auth or anonymous access in your Grafana configuration.

Choose which datasource to use (InfluxDB, Graphite). Import the JSON files from the dashboards directory.

  • base-metrics.json
  • icinga2-default.json

The default dashboard name is 'icinga2-default'. You can also configure it inside the module.

There are currently no default dashboards for PNP available. Please create them on your own and send a PR.


Global Configuration

You can edit global configuration settings in Icinga Web 2 in Configuration -> Modules -> grafana -> Configuration.

Setting Description
host Required. Grafana server host name (and port).
protocol Optional. Protocol used to access the Grafana server. Defaults to http.
graph height Optional. Graph height in pixel. Defaults to 280.
graph width Optional. Graph width in pixel. Defaults to 640.
timerange Optional. Global time range for graphs. Defaults to 6h.
enableLink Optional. Enable/disable graph with a rendered URL to the Grafana dashboard. Defaults to yes.
datasource Required. Type of the Grafana datasource (influxdb, graphite or pnp). Defaults to influxdb.
defaultdashboard Required. Name of the default dashboard which will be shown for unconfigured graphs. Set to none to hide the module output. Important: panelID must be set to 1! Defaults to icinga2-default.
defaultorgid Required. Number of the default organization id where dashboards are located. Defaults to 1.
shadows Optional. Show shadows around the graphs. ** Defaults to false.
defaultdashboardstore Optional. Grafana backend (file or database). Defaults to Database.
accessmode Optional. Controls whether graphs are fetched with curl (proxy), are embedded (direct) or in iframe ('iframe'. Direct access is faster and needs auth.anonymous enabled in Grafana. Defaults to proxy.
timeout Proxy only Optional. Timeout in seconds for proxy mode to fetch images. Defaults to 5.
username Proxy non anonymous only Required HTTP Basic Auth user name to access Grafana.
password Proxy non anonymous only Required HTTP Basic Auth password to access Grafana. Requires the username setting.
directrefresh Direct Only Optional. Refresh graphs on direct access. Defaults to no.
usepublic Optional Enable usage of publichost/protocol. Defaults to no.
publichost Optional Use a diffrent host for the graph links.
publicprotocol Optional Use a diffrent protocol for the graph links.
custvardisable Optional Custom variable (vars.idontwanttoseeagraph for example) that will disable graphs. Defaults to grafana_graph_disable.
theme Optional. Select grafana theme for the graph (light or dark). Defaults to light.

IMPORTANT Be warned on 'iframe' access mode the auto refresh will hit you!


vim /etc/icingaweb2/modules/grafana/config.ini

username = "your grafana username"
host = "hostname:3000"
protocol = "https"
password = "123456"
height = "280"
width = "640"
timerange = "3h"
enableLink = "yes"
defaultorgid = "1"
defaultdashboard = "icinga2-default"
shadows = "1"
datasource = "influxdb"
defaultdashboardstore = "db"
accessmode = "proxy"
timeout = "5"
directrefresh = "no"
usepublic = "no"
publichost = "otherhost:3000"
publicprotocol = "http"
custvardisable = "idontwanttoseeagraph"

Graph Configuration

You can add specific graph configuration settings in Icinga Web 2 in Configuration -> Grafana Graphs.

Setting Description
name Optional. The name (not the display_name) of the service or check command where a graph should be rendered.
dashboard Optional. Name of the Grafana dashboard to use.
panelId Optional. Graph panelId. Open Grafana and select to share your dashboard to extract the value.
orgId Optional. Organization Id where the dashboard is located. Open Grafana and select to share your dashboard to extract the value.
customVars Optional. Set additional custom variables used for Grafana.
timerange Optional. Specify the time range for this graph.
height Optional. Graph height in pixel. Overrides global default.
width Optional. Graph width in pixel. Overrides global default.


vim /etc/icingaweb2/modules/grafana/graphs.ini

dashboard = "my-own"
panelId = "42"
orgId = "1"
customVars = "&os=$os$"
timerange = "3h"
height = "100"
width = "150"


Search order

This module prefers the service name, then looks for an optional parametrized service name and for the service check command name.

If there is no match, it will use the default dashboard as fallback.


Service = "MySQL Users", check_command = mysql_health

At first glance Name = "MySQL Usage" must provide a match. Then MySQL and last but not least any service check_command attribute which is set to mysql_health.


This module borrows a lot from &


There are many ways to contribute to the Icinga Web module for Grafana -- whether it be sending patches, testing, reporting bugs, or reviewing and updating the documentation. Every contribution is appreciated!

Please continue reading in the contributing chapter.

Latest release

Release v1.1.8

Update 1.1.8


Name Description Size Type Last Changed
icingaweb2-module-grafana-1.1.8.tar.gz Module file for Icinga Web 2 459.90 kB application/x-gzip Download


Pleae rate the project