Graphite and Director PHP issue

check if any other module really needs the old ipl module
remove ipl it is deprecated as a module.
install icinga-php-library via package manager (v0.12) or check if it is installed

1 Like

that is still strange to me.
Did you checkout v1.10.2 of the director? Or are you using the master branch (or did sometime in the past) and maybe that could cause problems?

You can safely remove the /usr/share/icingaweb2/modules/director directory and make a new git clone (or install it via package) to not have any old remains hanging around.

Hello @log1c and @moreamazingnick ,

Below is a screenshot of all versions.

This is a brand-new server with a new Icinga installation, so no old versions are lying around.

I think that ipl v0.5.0 and icinga/icinga-php-library 0.7.0 are somehow connected (icinga-php-library = ipl).
If I try to mess with any of them then Director site stops displaying correctly.

Sadly, I’ve also had some difficulties from the start with the guide, as some of the pip related commands are not working anymore due to security changes.


An IT guy.

Which guide?

Screenshot 2023-08-03 at 10.46.11

yep, that would be interesting indeed.
Also I don’t remember any pip commands during the installation of icinga2 or any of it’s modules.

Please share them as well.

Buzzword security sparks another question. Are the selinux packages for icinga2 & icingaweb2 installed?

Hello again,

I meant this guide you’ve mentioned earlier in this thread:

These 3 pip commands appear right at the beginning of this guide, and are supposed to be run on the graphite environment:

The first command runs without an issue as it is only upgrading pip related components.
When running the other two commands I get an error that changing the install-lib is no longer supported.

I’m not a python/pip expert and have no idea how to rebuild these commands to make this work

Note: SELinux status is set to disabled.

An IT Guy.


Ah, yes. Forgot that I mentioned that.
But that is only for the graphite components.

The Director and Graphite module should work regardless of the way you have chosen to set up the graphite stuff.

As said I’m done with graphite as a whole, so can’t help there.
Just keep in mind that if you want to use historical data from a different graphite setup the storage-schema has to be the same on both instances, so the data can be read and written. (afaik)

To sum up, because I have lost oversight:

Graphite module v1.2.3 installed via git
Director module v.1.10.2 installed via git

You could try installating both modules via packages instead of git

Something I overlooked: Icinga Web 2 and icinga-php-library come via packages. Is there any reason they are not installed in the latest versions?

Don’t have any more ideas.

Hello there again,

After a few trails installing Graphite or Influxdb and Grafana, I’ve realized that the main issue is that there have been so many changes with the versions out there, that by the time a guide is written on how to install the modules, it is no longer valid.

For example, the documentation found regarding influxdb mentions the use of the command influx to create icinga2 database, but the shell is not present with influxdb2.

If I try to downgrade and continue using the guide, I’m presented with other problems from compatibility issues to other commands that are no longer valid.

Has anyone succeeded in installing and configuring any working graphing engine recently?
I seem to be missing something to make it work.

Still-graphless IT guy

Sadly the official docs for Influx are not that good for installtion (imo)

What I did recently:
Add the influx repo:

install influxdb2 and influxdb2-cli.
This will set up a running instance on :8086 and there you can complete the setup.
First login is with admin:admin (iirc) and then you configure a new password.
After that comes the organization and bucket related setup.
Then you can create an API token for your bucket and put it in the feature config for icinga.

Grafana installation from the docs: Install Grafana | Grafana documentation

Hello @log1c,

I’ve managed to make some progress, but I’ve encountered a problem which I don’t understand.
The following error is shown instead of graphs and the number id may vary:
Where did I go wrong with the configuration or what have I missed?
I don’t even know what to add as debug info.

IT guy

Looks like your panel has a different id.

When you click on the three-dot-menu and click “view”
you can see the panelid in the URL: &viewPanel=1

Then add the dashboard to the module with the UID and the panelid

Name can differ from the dashboard-name as it corresponds with the check command name.

Hello again,

I don’t fully understand the required settings for icinga2-influxdb2-grafana settings to work.
Do I need to install Telegarph as well?

Something is still missing :face_with_diagonal_mouth:

influxdb2 settings are different from those of influxdb - shell doesn’t exist and I can’t just create a database.

IT guy

in influxdb2 you have buckets instead of databases.
the whole creation of buckets, setting the retention period and creating the required API token for the icinga2 feature can be done via the webinterface.

no, afaik

icinga2 sends perfdata to influx(2) via influxdb(2) feature, grafana needs to access (read) influx to create dashboards with graphs. InfluxDB2 uses a new query language Flux instead of InfluxQL with InfluxDB1
in the influxdb2 webinterface you have the option to create queries click-by-click and than use that query in your grafana dashboard.

Hello again :smiley:,

I’ve finally managed to get to a situation in which I’m presented with an empty graph.
I guess that now the queries’ part you’ve mentioned come into play. I have no idea where to begin and how to configure these queries nor where (Grafana side or InfluxDB side).

I don’t even know how to check if the configurations I’ve made really do something, as I’ve not found where InfluxDB stores the actual data.

Sorry if I ask a lot of questions but this is my first time installing this software combo, and I’ve yet to find a guide that covers the whole process.

IT guy

Influx data storage should be under /var/lib/influxdb

If you see measurements in your bucket on the webinterface of the influxdb, your icinga instance is writing the perfdata.

here is a very basic gafana dashboard:

from(bucket: "icinga2")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => 
    r._measurement == "${command}" and
    r._field == "value" and
    r.hostname == "${hostname}" and
    r.service == "${service}"
  |> map(fn: (r) => ({ _value:r._value, _time:r._time, _field:r.metric}))

create a new dashboard, add variables (constants) to it named hostname, service and command and then create a new panel with the above “code” as Flux query (replace bucket name with yours)

Hi there @log1c ,

I’ve fiddled around with InfluxDB and Grafana settings but I don’t fully understand the connection between the two.

I can see that on InfluxDB the data populates like so under meausrement:

From there I’m in a bit of a loss. I’ve tried to create a dashboard and save various queries, but whatever I do, it doesn’t seem to effect the graphs under grafana. The graphs remain with “no data”.

When trying to use your code, I get an error “undefined identifier”. Where do I define these identifiers and are they considered as varibles?

How did you manage to undertand and configure all these components? :confused:

IT guy


Just an update: I think I’ve made it - at least one graph is working. :smiley:

I’ve finally figured it out, that you have to build the query with the help of Influxdb query builder and then paste it into the Grafana designated graph on the dashboard.

The weird thing is that when trying to pick a hostname at topmost section I am presented only with the option “None”, I supposedly should be able to pick the hostname and see all the relevant graphs for that hostname on the dashboard.

Even so, the only graph that I’ve managed to configure is proudly displayed on each host.
I am hopeful that I will fully understand how to use these variables, as I’ve done many trials and errors until it has somehow started working (on Icinga, but not on Grafana’s dashboard)

Best and thanks for all the tips and pointers,
A with-graph IT guy.

1 Like

This way is valid, but you then have a hardcoded graph for just that one host & service combination.

For that you would have to change the hostname variable in the grafana dashboard to a “query” and then create a query that yields your desired set of hostnames.

Drawback of this is that you don’t have a “dynamic” graph in the webinterface that always fits the host you are looking at. That is what the method with the constant variable does, as this variable is always filled with the hostname you are currently displaying (${hostname} in my example).

You have to create “constant” variables with the names hostname, service and command in the settings section of your dashboard.

What version of Influxdb and Grafana did you install? The latest IcingaWeb2 Grafana module release v2.0.3 doesn’t support IcingaWeb v2.9.5 which is what I have at the moment (You mentioned you have this same release in your env).


The versions are as follows:

  • Grafana v7.5.15 (NA)
  • InfluxDB v2.7.1
  • Grafana module 1.4.2

I’m still having difficulties setting up the graphs as I would like to, so it may very well be due to version incompatibility (or user’s [my] understanding of the system - or rather the lack of it :crazy_face:)

IT guy

1 Like