icingaweb2-module-nagvis icon indicating copy to clipboard operation
icingaweb2-module-nagvis copied to clipboard

Upgrade to Icinga DB Web 1.1.0 causes conflict

Open mdetrano opened this issue 10 months ago • 1 comments

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

  • Icinga DB Web version (System - About): 1.1.0
  • Icinga Web 2 version (System - About): 2.12.0
  • Web browser: Firefox
  • Icinga 2 version (icinga2 --version): 2.14
  • Icinga DB version (icingadb --version): 1.1.1
  • PHP version used (php --version): 8.0

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.

mdetrano avatar Oct 06 '23 16:10 mdetrano