Page 3 of 3
Re: Unconfigured objects not showing up
Posted: Thu May 02, 2013 9:24 pm
by scottwilkerson
First lets comment out the following line from your /etc/php.ini
and restart httpd
Now I would like you to run the following and return the output
Code: Select all
php -q /usr/local/nagiosxi/scripts/parse_core_eventlog.php
cat /etc/php.ini |grep disable_functions
Re: Unconfigured objects not showing up
Posted: Fri May 03, 2013 8:19 am
by johndoe
Code: Select all
[root@mon ~]# php -q /usr/local/nagiosxi/scripts/parse_core_eventlog.php
CURRENT SIZE: 0
LAST SIZE: 0
READ ALL=Yes
READ BYTES=0
CMD=cat /usr/local/nagios/var/nagios.log > /usr/local/nagiosxi/var/corelog.diff
CMD=grep 'Warning: Check result queue contained results for ' /usr/local/nagiosxi/var/corelog.diff
MATCHES=
Array
(
)
CMD=grep 'Passive check result was received for ' /usr/local/nagiosxi/var/corelog.diff
MATCHES=
Array
(
)
MISSING OBJECTS:
Array
(
)
Code: Select all
[root@mon ~]# cat /etc/php.ini |grep disable_functions
disable_functions =
I believe sometime ago Scott had a remote support session with us due to a similar problem and the issue ended up being on the log files being hardcoded somewhere on nagios and not adapting to changes, at the time this was supposedly fixed, can it be a re-occurance of the bug? (Note: I'm not 100% sure it was this same bug)
we do have the logs pointed to another folder...
I noticed this script is trying to access usr/local/nagios/var/nagios.log however our logs are in /somefolder/var/nagios.log . As such this file is actually empty '/usr/local/nagios/var/nagios.log'
After a bit more searching i noticed the file '/usr/local/nagios/etc/nagios.cfg.xi' had the log_file pointing to '/usr/local/nagios/var/nagios.log' and not '/somefolder/var/nagios.log' whereas the file file '/usr/local/nagios/etc/nagios.cfg.xi' had the log_file pointing to '/somefolder/var/nagios.log' could this have been messed in an upgrade or so? all was working fine until sometime ago... also i don't recall existing two config files...
After correcting these to point to '/somefolder/var/nagios.log' on both log files i'm able to see the unconfigured objects... Will give it some time to ensure all is working correctly.
Why has this happened? misconfiguration from our part? updates? all was working ok until recently...
Re: Unconfigured objects not showing up
Posted: Fri May 03, 2013 8:45 am
by johndoe
on a side note, i'm now unsure of what fixed it, seems fixing it only on the config file didn't help, however when i hard-code it on the file '/usr/local/nagiosxi/scripts/parse_core_eventlog.php' then it seems to work
Code: Select all
$log_file = grab_array_var($cfg['component_info']['nagioscore'],'log_file', '/somefolder/var/nagios.log');
Re: Unconfigured objects not showing up
Posted: Fri May 03, 2013 2:47 pm
by abrist
I assume symlinking the log files default location to the real location is out of the question in your environment?
Re: Unconfigured objects not showing up
Posted: Mon May 06, 2013 7:35 am
by johndoe
Not out of the question and probably what needs done, however nagios has a configuration to change the log location (which we used), shouldn't it just work?
Re: Unconfigured objects not showing up
Posted: Mon May 06, 2013 10:23 am
by scottwilkerson
Actually, you will need to add the following to your
/usr/local/nagiosxi/html/config.inc.php
find
Code: Select all
$cfg['component_info']=array(
"nagioscore" => array(
change to
Code: Select all
$cfg['component_info']=array(
"nagioscore" => array(
"log_file" => "/usr/local/nagios/var/nagios.log",