RHEL9 w/Nagios XI version 2024R1.1.4
I upgraded last week but just noticed that I was unable to issue commands via the web interface. For example Home->Tactical Overview->Notifications I' receive errors attempting to ENABLE/DISABLE anything. The following error was prevalent in the logs so I commented out a block of code (lines 315 to 320) and now it's working, however, I have no idea what I may have broken by doing this.
Mon, 08 Jul 2024 17:32:01 -0700 PROCESSED 0 COMMANDS
PHP Warning: Undefined array key "REQUEST_METHOD" in /app/nagios/nagiosxi/html/includes/utils.inc.php on line 315
............................................................PHP Warning: Undefined array key "REQUEST_METHOD" in /app/nagios/nagiosxi/html/includes/utils.inc.php on line 315
Nagios CORE commands failing from XI web interface
Re: Nagios CORE commands failing from XI web interface
We use grab_request_vars in many locations so its best to not comment out this code. I'm not sure what your line 315 looks like but it seems like there isn't a guard for if that array key exists. If you want to get rid of the warning you mentioned above and you feel fine updating the code you can change line 315 to this:BenCowan wrote: ↑Mon Jul 08, 2024 7:56 pm RHEL9 w/Nagios XI version 2024R1.1.4
I upgraded last week but just noticed that I was unable to issue commands via the web interface. For example Home->Tactical Overview->Notifications I' receive errors attempting to ENABLE/DISABLE anything. The following error was prevalent in the logs so I commented out a block of code (lines 315 to 320) and now it's working, however, I have no idea what I may have broken by doing this.
Mon, 08 Jul 2024 17:32:01 -0700 PROCESSED 0 COMMANDS
PHP Warning: Undefined array key "REQUEST_METHOD" in /app/nagios/nagiosxi/html/includes/utils.inc.php on line 315
............................................................PHP Warning: Undefined array key "REQUEST_METHOD" in /app/nagios/nagiosxi/html/includes/utils.inc.php on line 315
Code: Select all
if (array_key_exists('REQUEST_METHOD', $_SERVER) && $_SERVER['REQUEST_METHOD'] == "PUT") {
Re: Nagios CORE commands failing from XI web interface
That worked great. Thanks. Will that alternate code be in future upgrades?
Re: Nagios CORE commands failing from XI web interface
@BenCowan,
Yes, this change will be included in future updates.
Yes, this change will be included in future updates.
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
Re: Nagios CORE commands failing from XI web interface
sgardil wrote: ↑Tue Jul 09, 2024 9:18 amWe use grab_request_vars in a many locations so its best to not comment out this code. I'm not sure what your line 315 looks like but it seems like there isn't a guard for if that array key exists. If you want to get rid of the warning you mentioned above and you feel fine updating the code you can change line 315 to this:BenCowan wrote: ↑Mon Jul 08, 2024 7:56 pm RHEL9 w/Nagios XI version 2024R1.1.4Incredibox game
I upgraded last week but just noticed that I was unable to issue commands via the web interface. For example Home->Tactical Overview->Notifications I' receive errors attempting to ENABLE/DISABLE anything. The following error was prevalent in the logs so I commented out a block of code (lines 315 to 320) and now it's working, however, I have no idea what I may have broken by doing this.
Mon, 08 Jul 2024 17:32:01 -0700 PROCESSED 0 COMMANDS
PHP Warning: Undefined array key "REQUEST_METHOD" in /app/nagios/nagiosxi/html/includes/utils.inc.php on line 315
............................................................PHP Warning: Undefined array key "REQUEST_METHOD" in /app/nagios/nagiosxi/html/includes/utils.inc.php on line 315Let us know if this fixes your issue.Code: Select all
if (array_key_exists('REQUEST_METHOD', $_SERVER) && $_SERVER['REQUEST_METHOD'] == "PUT") {
Re: Nagios CORE commands failing from XI web interface
If Nagios CORE commands are failing when executed through the Nagios XI web interface, but work via the command line, it’s often related to permissions, configuration issues, or web interface settings. incredibox sprunki