Unconfigured objects not showing up

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unconfigured objects not showing up

Post by scottwilkerson »

First lets comment out the following line from your /etc/php.ini

Code: Select all

extension=ixed.5.3.lin
and restart httpd

Code: Select all

service httpd restart
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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
johndoe
Posts: 114
Joined: Fri Oct 28, 2011 10:14 am

Re: Unconfigured objects not showing up

Post 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...
Nagios XI 2012R2.8c Running on Ubuntu 12.04 Using 99% passive checks for monitoring
Monitoring nearly 800 Passive services spread through roughly 40 machines
Running on an 8 core, KVM virtualized VM, with 15 GB of RAM and using RAMDisk
johndoe
Posts: 114
Joined: Fri Oct 28, 2011 10:14 am

Re: Unconfigured objects not showing up

Post 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');
Nagios XI 2012R2.8c Running on Ubuntu 12.04 Using 99% passive checks for monitoring
Monitoring nearly 800 Passive services spread through roughly 40 machines
Running on an 8 core, KVM virtualized VM, with 15 GB of RAM and using RAMDisk
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Unconfigured objects not showing up

Post by abrist »

I assume symlinking the log files default location to the real location is out of the question in your environment?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
johndoe
Posts: 114
Joined: Fri Oct 28, 2011 10:14 am

Re: Unconfigured objects not showing up

Post 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?
Nagios XI 2012R2.8c Running on Ubuntu 12.04 Using 99% passive checks for monitoring
Monitoring nearly 800 Passive services spread through roughly 40 machines
Running on an 8 core, KVM virtualized VM, with 15 GB of RAM and using RAMDisk
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unconfigured objects not showing up

Post 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",
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked