Virsacer/icingaweb2-module-rrdtool

Cannot view graphs

jpkool opened this issue · 24 comments

I have gone through and installed the module as instructed but I have no way of viewing the graphs.
There seems to be no option
I can see all the RRD files being created, but nothing is showing up on the dashboard

Hi,
does your webserver have the permission to access the directory where the RRD/XML files are?
Then the graphs should appear automatically.

Hi,
Yes just checked that now and they are all permissioned with the same user and group that the rest of the folders (apache.icingaweb2)
I have restarted all the services also and nothing seems to be coming up
I have also disabled and re-enabled the module No graphs come up on any page.

What about parent folder(s)?
Best way to check is to switch to apache-user in bash and try to list the contents of the directory.

I should probably add some kind of permission-check...

But graphs do not show up on the dashboard itself.
They apear on the detail pages of hosts and services below the "Plugin Output" section.
The module checks if there is a coresponding XML file for the host/service and then renders the images.

Ok.... So there was a permission problem for the apache user. I fixed that. Restarted all the services again, but still nothing showing up under Plugin Output

probably worth mentioning that pnp4nagios was previously installed, but I removed all the packages for it. Not sure if there is some reminent laying about from that possibly preventing this.

What is the output of icingacli rrdtool check?

If path and permissions are correct, even data generated by pnp4nagios can be displayed.
The module and pnp4nagios should not be generating RRDs at the same time but otherwise there is no interference.

I added a check to the settings-page.
Can you test with this version?

Ok I updated to the latest version. I deleted all the RRD folders so that they are recreated. I ran the check and it came up with "found extra data on update argument: 29.4" on one of the checks. on one "expected 53 data source readings (got 52) from 1666339212" on another. There are over a 200 other files that don't see to have an issue.

Also noticed that you can go to http:///icingaweb2/rrdtool/...... I try pull the graphs from there, but every time I click submit it appends the same range I set to the end of the URL which does not look right.

All in all, still not seeing any graphs. Sometimes I see it trying to populate under Plugin Output (very rarely and random and sometimes when it refreshes automatically, but soon disappears a couple of seconds later) but inside the graphing area it says "XML Missing". and I checked all the XML files are there.

Another thing I did find is that when running in dark mode the range fields do not show the values selected in there as they are the same colour as the background. It is only visible in light mode.

Ok, so from commandline it seems to be working.
But what do you see in "Path is readable" on the settings-page?

Do you use the rrdtool-binary or the php-module?
Do you have selinux/apparmor that might be blocking/limiting access to the path?

Perhaps you can make a screenshot when you see something below "Plugin Output"?

Thanks for the hints with the appending range and darkmode!

I ended up restarting the php-fpm service and that seems to have brought some things to life. Not all graphs are showing though. Only some of them. Which is very odd. Theones that are not viewable are showing nothing under Plugin Output.

So I don't see a "Path is readable" on the settings page.

I have both the rrdtool-binary and the php-module installed. Should I remove the php module?
don't have selinux/apparmor installed

the appending range issue seems to have resolved once the php-fpm service was restarted.

How does your module handle a ":" ?
The checks that don't seem to graph properly are those ones that have that. The description are of Drive letters eg, C:
RRDTOOL changes the rrd and xml files by replacing a ":" with a "_"
Does your modules support that ? because that looks like the possible problem

Ok, thats great :-)

I added this in the latest commit, but since you got (some) graphs this is now irrelevant.

The php-module is preferrred since it is faster.

I also have windows-drives which work perfectly fine:
image

Can you send me a rrd+xml file which does not show up?

C__Drive_Free_Space.zip

Here is an example as requested

Ah, you have the colon in the service-name...
I had not thought of this case before

Hi, When will there be an update for this fix? I downloaded the latest and it still does not work.

Another thing, don't know if this is an issue with icinga or what, but it still shows the version as 1.3.6 instead of 1.3.8 even though I have done a git pull to a new clean folder.

The fix is included in version 1.3.8

When it does not show that version, something is wrong with your installation...

So I have gone through this all over again. The changes you have put in are definitely there. I checked the code according to your changes and it is definitely running 1.3.8. I think the versions showing as 1.3.6 in the GUI is an icinga issue (possibly entries in the database that are not updating when the version changes). So I don't think that is the problem as the php code is definitely there and correct.

It still does not show the graphs.

Ok I think I found the issue.

When looking at the URL it would populate as:
service=C%3A%20Drive%20Free%20Space

If I change the URL to:
service=C%20%20Drive%20Free%20Space

That works.

What is the output of icingacli module list?
Go to URL /rrdtool/config/settings - is there a Path is readable shown on the page?

%3A is a : which will be handled correctly by version 1.3.8:
image

the output I have is :
rrdtool 1.3.6 enabled Icinga Web 2 rrdtool module

as mentioned 1.3.8 has been put in as a completly new folder (removed the old on and put this in its place). Is there anything special I need to do to "upgrade" these modules in icinga? because I would have though this should be as easy and disabling it, copying over a new folder, and re-enabling and restarting the services?

Went to that URL and there is no "path is readable" on the page.

Ok I got it working ... my apologies .... the folder path that I was installing the modules into was wrong. I rechecked the settings and found the location .... really sorry for all that.
It is now all working.
Thank you for sorting this out

Then it is definitely using the old version...
Usually replacing the files is sufficient (no need for disable/enable or restarting anything)

Enable/disable just sets/removes symlink.
What happens to icingacli module list when you remove the folder without disabling?

Are you using an opcache or Docker?

Ok, glad its working now :-)