Unsupported operand types: DateTime - DateTime

Hi,
last week we updated the following packages on our Icinga2 Master Node:

  • Icingadb 1.1.1
  • Business Process 2.5.0
  • PHP 8.1

After that, the Load increased dramatically, mainly caused by mysqld. When disabling icingadb or the business process module, the load drops instantly.

Additionally icingadb doesn’t show any details of hosts or services, only

Unsupported operand types: DateTime - DateTime


#0 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Widget/Detail/ObjectDetail.php(468): Icinga\Module\Grafana\ProvidedHook\Grapher->getPreviewHtml() #1 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Widget/Detail/HostDetail.php(56): Icinga\Module\Icingadb\Widget\Detail\ObjectDetail->createExtensions() #2 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(344): Icinga\Module\Icingadb\Widget\Detail\HostDetail->assemble() #3 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(566): ipl\Html\HtmlDocument->ensureAssembled() #4 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(390): ipl\Html\HtmlDocument->render() #5 /usr/share/icinga-php/ipl/vendor/ipl/html/src/BaseHtmlElement.php(297): ipl\Html\HtmlDocument->renderUnwrapped() #6 /usr/share/icinga-php/ipl/vendor/ipl/html/src/BaseHtmlElement.php(365): ipl\Html\BaseHtmlElement->renderContent() #7 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(568): ipl\Html\BaseHtmlElement->renderUnwrapped() #8 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(390): ipl\Html\HtmlDocument->render() #9 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(568): ipl\Html\HtmlDocument->renderUnwrapped() #10 /usr/share/icinga-php/ipl/vendor/ipl/web/src/Compat/ViewRenderer.php(56): ipl\Html\HtmlDocument->render() #11 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action/Helper/ViewRenderer.php(970): ipl\Web\Compat\ViewRenderer->render() #12 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch() #13 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Web/Controller.php(480): Zend_Controller_Action_HelperBroker->notifyPostDispatch() #14 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Icinga\Module\Icingadb\Web\Controller->dispatch() #15 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Front.php(954): Icinga\Web\Controller\Dispatcher->dispatch() #16 /usr/share/php/Icinga/Application/Web.php(294): Zend_Controller_Front->dispatch() #17 /usr/share/php/Icinga/Application/webrouter.php(105): Icinga\Application\Web->dispatch() #18 /usr/share/icingaweb2/public/index.php(4): require_once(String) #19 {main}

The same issue is known on Business Process v 2.4 which is handled here Problem with businessprocess in Version: 2.4.0, but we are already on 2.5.0 and the issue is on icingadb-web which is also the latest version available.

Installed Modules

  • Icinga DB Web version (System - About): 1.1.1
  • Icinga Web 2 version (System - About): 2.12.1
  • Web browser: Firefox 115.5.0esr
  • Icinga 2 version (icinga2 --version): 2.14.0
  • Icinga DB version (icingadb --version): 1.1.1
  • PHP version used (php --version): 8.1
  • Server operating system and version: SLES 15 SP5
  • Incubator 0.20.0
  • ipl 0.5.0

what’s your version of icinga-php-library and icinga-php-thridparty? are there updates for that?

icinga-php-library is on version 0.13.1 and icinga-php-thirdparty on 0.12.1. They seem to be the latest possible versions

what version of icingaweb2-module-grafana do you use?

if its not 2.0.3 disable or update it and try again.

Hi,
you were right, the grafana module was still on Version 1.4.2. I just upgraded to 2.0.3 and at least the error on displaying service and host details in icingadb is solved. The load is still insane when icingadb-web is enabled. And we still have everywhere the notification about

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Db/Statement.php on line 212

Any ideas?

glad this solved your error with grafana, I recognised you opened another thread for your other problem. please close this one by marking a solution.
best regards
nicolas

1 Like