Page 1 of 1

PNP not working

Posted: Thu Oct 16, 2025 4:44 am
by smoren
Hello all,
we are experiencing an issue with PNP in the Nagios Core interface on our Nagios XI server.

When I open a URL such as https://nagiosserver/nagios/pnp/index.p ... v=service1
I receive an HTTP ERROR 500.

After some troubleshooting and reading log files, it seems that certain php files need updates to support newer versions of PHP. Out of curiosity, I tried making a few changes myself and managed to fix some of the errors, but it is not a viable solution (future update would overwrite files, other customers might encounter the same issue,...).

Background - we have a custom script that uses PNP to display graphs for dynamically created RR files. I cannot achieve this using Nagios XI interface, as there are not service definitions for these graphs.

Here is the relevant part of the log file: /var/log/php-fpm/www-error.log

Code: Select all

[16-Oct-2025 10:16:19] WARNING: [pool www] child 1756450 said into stderr: "NOTICE: PHP message: PHP Warning:  Undefined array key "txt" in /usr/local/nagios/share/pnp/include/debug.php on line 55"
[16-Oct-2025 10:16:19] WARNING: [pool www] child 1756450 said into stderr: "NOTICE: PHP message: PHP Warning:  Undefined array key "rc" in /usr/local/nagios/share/pnp/include/debug.php on line 260"
[16-Oct-2025 10:16:19] WARNING: [pool www] child 1756450 said into stderr: "NOTICE: PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /usr/local/nagios/share/pnp/include/function.inc.php:719"
[16-Oct-2025 10:16:19] WARNING: [pool www] child 1756450 said into stderr: "Stack trace:"
[16-Oct-2025 10:16:19] WARNING: [pool www] child 1756450 said into stderr: "#0 /usr/local/nagios/share/pnp/index.php(91): doClean()"
[16-Oct-2025 10:16:19] WARNING: [pool www] child 1756450 said into stderr: "#1 {main}"
[16-Oct-2025 10:16:19] WARNING: [pool www] child 1756450 said into stderr: "  thrown in /usr/local/nagios/share/pnp/include/function.inc.php on line 719"
[16-Oct-2025 10:33:14] WARNING: [pool www] child 1818742 said into stderr: "NOTICE: PHP message: PHP Warning:  Undefined array key "enable_recursive_template_search" in /usr/local/nagios/share/pnp/include/function.inc.php on line 1210"
[16-Oct-2025 10:33:14] WARNING: [pool www] child 1818742 said into stderr: "NOTICE: PHP message: PHP Warning:  Undefined array key "rc" in /usr/local/nagios/share/pnp/include/debug.php on line 260"
[16-Oct-2025 10:33:14] WARNING: [pool www] child 1818742 said into stderr: "NOTICE: PHP message: PHP Warning:  Undefined array key "rc" in /usr/local/nagios/share/pnp/include/debug.php on line 260"
[16-Oct-2025 10:33:14] WARNING: [pool www] child 1818742 said into stderr: "NOTICE: PHP message: PHP Warning:  Undefined variable $lower in /usr/local/nagios/share/pnp/templates.dist/default.php on line 48"
[16-Oct-2025 10:33:14] WARNING: [pool www] child 1818742 said into stderr: "NOTICE: PHP message: PHP Warning:  Only the first byte will be assigned to the string offset in /usr/local/nagios/share/pnp/templates.dist/default.php on line 48"
[16-Oct-2025 10:33:14] WARNING: [pool www] child 1818742 said into stderr: "NOTICE: PHP message: PHP Warning:  Only the first byte will be assigned to the string offset in /usr/local/nagios/share/pnp/templates.dist/default.php on line 50"
[16-Oct-2025 10:33:14] WARNING: [pool www] child 1818742 said into stderr: "NOTICE: PHP message: PHP Fatal error:  Uncaught Error: Cannot use assign-op operators with string offsets in /usr/local/nagios/share/pnp/templates.dist/default.php:51"
[16-Oct-2025 10:33:14] WARNING: [pool www] child 1818742 said into stderr: "Stack trace:"
[16-Oct-2025 10:33:14] WARNING: [pool www] child 1818742 said into stderr: "#0 /usr/local/nagios/share/pnp/include/function.inc.php(97): include()"
[16-Oct-2025 10:33:14] WARNING: [pool www] child 1818742 said into stderr: "#1 /usr/local/nagios/share/pnp/index.php(170): doDataArray()"
[16-Oct-2025 10:33:14] WARNING: [pool www] child 1818742 said into stderr: "#2 {main}"
[16-Oct-2025 10:33:14] WARNING: [pool www] child 1818742 said into stderr: "  thrown in /usr/local/nagios/share/pnp/templates.dist/default.php on line 51"
[16-Oct-2025 10:33:32] WARNING: [pool www] child 2345891 said into stderr: "NOTICE: PHP message: PHP Deprecated:  Optional parameter $out declared before required parameter $data is implicitly treated as a required parameter in /usr/local/nagios/share/pnp/include/function.inc.php on line 633"
[16-Oct-2025 10:33:32] WARNING: [pool www] child 2345891 said into stderr: "NOTICE: PHP message: PHP Warning:  Undefined array key "txt" in /usr/local/nagios/share/pnp/include/debug.php on line 55"
Probably unrelated to PNP, I also noticed several "undefined array key" warnings in /usr/local/nagiosxi/html/includes/components/xicore/status-utils.inc.php:

Code: Select all

[16-Oct-2025 10:16:23] WARNING: [pool www] child 1786076 said into stderr: "NOTICE: PHP message: PHP Warning:  Undefined array key "host_display_name" in /usr/local/nagiosxi/html/includes/components/xicore/status-utils.inc.php on line 1114"
[16-Oct-2025 10:16:23] WARNING: [pool www] child 1786076 said into stderr: "NOTICE: PHP message: PHP Warning:  Undefined array key "host_current_state" in /usr/local/nagiosxi/html/includes/components/xicore/status-utils.inc.php on line 1115"
[16-Oct-2025 10:16:23] WARNING: [pool www] child 1786076 said into stderr: "NOTICE: PHP message: PHP Warning:  Undefined array key "host_current_state" in /usr/local/nagiosxi/html/includes/components/xicore/status-utils.inc.php on line 1116"
[16-Oct-2025 10:16:23] WARNING: [pool www] child 1786076 said into stderr: "NOTICE: PHP message: PHP Warning:  Undefined array key "host_status_text" in /usr/local/nagiosxi/html/includes/components/xicore/status-utils.inc.php on line 1117"
[16-Oct-2025 10:16:23] WARNING: [pool www] child 1786076 said into stderr: "NOTICE: PHP message: PHP Warning:  Undefined array key "status_text" in /usr/local/nagiosxi/html/includes/components/xicore/status-utils.inc.php on line 1135"
If I can help in any way to troubleshoot this, feel free to reach out.

Environment: Nagios XI 2026R1, RHEL9.6, PHP 8.3.

Thanks.

Re: PNP not working

Posted: Thu Oct 16, 2025 4:18 pm
by lgute
Hi @smoren,

Thanks for reaching out and letting us know. I'll get a ticket created to put it on the Development team's radar.