Page 1 of 1

Apply Config takes a long time, found PHP error in CLI reconfigure_nagios.sh

Posted: Fri Nov 22, 2024 4:49 pm
by gregbeyer
Why am I getting this error when attempting reconfigure_nagios.sh ?

$sudo /usr/local/nagiosxi/scripts/reconfigure_nagios.sh

--- reset_config_perms.sh ------------
> Setting script permissions
> Setting CCM script permissions

<---snip--->

--- ccm_export.php -------------------
> Writing CCM configuration to Nagios files
PHP Warning: Undefined variable $strVIValues in /usr/local/nagiosxi/html/includes/components/ccm/classes/config.class.php on line 1379

Re: Apply Config takes a long time, found PHP error in CLI reconfigure_nagios.sh

Posted: Mon Nov 25, 2024 10:44 am
by jsimon
Hi Greg,

This is a PHP warning, not an explicit error. It indicates that a variable is defined and being used without checked for it's value to make sure it has one. I have made a note of this warning, as it is something we should be handling, however it is unlikely to be the direct cause of Apply Config appearing to take a while to complete.

Re: Apply Config takes a long time, found PHP error in CLI reconfigure_nagios.sh

Posted: Tue Nov 26, 2024 1:33 am
by kg2857
Maybe run reconfigure_nagios.sh and see what's slow.Then investigate more. Rinse and repeat.

Re: Apply Config takes a long time, found PHP error in CLI reconfigure_nagios.sh

Posted: Tue Nov 26, 2024 3:01 pm
by gregbeyer
As I originally posted, that is what I did -- reconfigure_nagios.sh. Only thing that comes back unusual is the error message I posted. Already ran repair_database.sh and repairmysql.sh.

Oh, and reconfigure_nagios.sh also is now at over 5 minutes running, sitting at that error message. I finally hit Ctrl + C.

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg comes back with 6 warnings, 0 errors. Warnings are no contact or contactgroup defined for 6 nodes.

Re: Apply Config takes a long time, found PHP error in CLI reconfigure_nagios.sh

Posted: Tue Nov 26, 2024 3:38 pm
by gregbeyer
I see also ion second page of viewtopic.php?p=359643#p359643 that I'm not the only one experiencing excessive time for apply config to complete.