PNP broken on Icingaweb2 v2.5.1?


(Clark Andreasen) #1

I recently updated my Icinga core and icingaweb2 to the latest versions, and after the update my PNP graphs were missing. The standalone pnp4nagios interface is still accessible and works fine. I assumed the pnp module was out of date, so I grabbed the latest from git (later I tried the latest release, same issues followed) and was greeted by this error when I tried to click on the module in icingaweb2:

Fatal error: Uncaught exception ‘ErrorException’ with message ‘Undefined index: file’ in /usr/share/php/Icinga/Exception/IcingaException.php:77 Stack trace: #0 /usr/share/php/Icinga/Exception/IcingaException.php(77): Icinga\Application{closure}(8, ‘Undefined index…’, ‘/usr/share/php/…’, 77, Array) #1 /usr/share/icingaweb2/application/controllers/ErrorController.php(98): Icinga\Exception\IcingaException::getConfidentialTraceAsString(Object(ErrorException)) #2 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Controllers\ErrorController->errorAction() #3 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(‘errorAction’) #4 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #5 /usr/share/php/Icinga/Application/Web.php(407): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #6 /usr/share/php/Icinga/Appl in /usr/share/icingaweb2/library/vendor/Zend/Controller/Plugin/Broker.php on line 332

Enabling the module using icingacli proved even worse, as similar errors cropped up for nearly the entire UI.

This is on CentOS 6.9, php 7.0. I can provide any further information that you think might be relevant

EDIT: attaching a screenshot


(Michael Friedrich) #2

The actual error is hidden by a bug in the exception handler. Can you share your /etc/icingaweb2/modules/pnp/config.ini file?


(Clark Andreasen) #3

Sorry for the delay, Here is that ini file:

[pnp4nagios]

config_dir = “/usr/local/pnp4nagios/etc”
base_url = “/pnp4nagios”

I think this is left over from the previous version of the pnp module


(Clark Andreasen) #4

I found the issue. The permissions on the folder were wrong, not sure how that happened

[root@host ~]# ls -latr /etc/icingaweb2/modules/pnp/
total 16
-rw-r–r-- 1 root icingacmd 83 Mar 2 2016 config.ini.bak
drwxrws— 6 root icingaweb2 4096 Jan 22 07:40 …
-rw-r–r-- 1 root icingacmd 153 Apr 15 14:28 config.ini
drwxr-sr-x 2 icinga icingacmd 4096 Apr 15 14:28 .

Changed it to apache:icingaweb2 (copied permissions from /etc/icingaweb2/modules/monitoring) and it all cleared up, plus my graphs are back as well.

Thanks for the push in the right direction, and great work on this project, it’s become an invaluable tool over the past couple years.