Icinga / icingaweb2-module-nagvis

NagVis integration into Icinga web 2
GNU General Public License v2.0
39 stars 22 forks source link

Upgrade to Icinga DB Web 1.1.0 causes conflict #55

Closed mdetrano closed 2 months ago

mdetrano commented 1 year ago

Describe the bug

After upgrading to version 1.1.0 of icingadb-web, opening maps in NagVis will show an ErrorException (due to attempts to implicitly cast DateTime objects to integers). That may in fact be something that needs fixed in Nagvis, however, that code usually produces a PHP Notice and does not show any error to the end user.

To Reproduce

Install Icinga Web 2 system with icingadb module and nagvis module, following the guide to patch Nagvis and integrate with Icingadb as backend. (was tried with both rpm package of icingadb-web, and git checkout)

Attempt to open the Automap or any map with monitoring objects.

Map will not display and instead an Exception will be shown (including: "Object of class DateTime could not be converted to int")

Downgrading to icingadb-web 1.0.1 will resolve the issue.

Expected behavior

Nagvis Maps displayed

Your Environment

Additional context

I suspect something after processing Icinga's EmbeddedWeb environment is causing an error to be thrown that previously would have been silently ignored.

I tested this on a system with every other module disabled...just icingadb, and nagvis.

adamparker commented 4 months ago

For other users, there is an updated version of GlobalBackendicingadb.php available in the commit by @yhabteab here:

https://github.com/Icinga/icingaweb2-module-nagvis/pull/53/commits/22eb7aacd0e79897f14b7f5b47112b63ebb9d957

For me this was solved when the fixed file is put in both locations (or symlinked but I didn't test this)

This commit is a year old and I don't know why it's stuck in the pull request queue.