Hosts and Services not appearing in views

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Keo
Posts: 33
Joined: Wed May 09, 2012 12:11 pm

Re: Hosts and Services not appearing in views

Post by Keo »

lmiltchev wrote:Can you see the hosts/services in the Nagios Core?

Code: Select all

http://server_ip/nagios
yes
nagios_core.png
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Hosts and Services not appearing in views

Post by lmiltchev »

I wonder if it is a ndo issue... Run the following commands:

Code: Select all

service nagios stop
killall -9 nagios
service ndo2db stop
service ndo2db start
service nagios start
Let us know if this fixed your problem.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Keo
Posts: 33
Joined: Wed May 09, 2012 12:11 pm

Re: Hosts and Services not appearing in views

Post by Keo »

lmiltchev wrote:I wonder if it is a ndo issue... Run the following commands:

Code: Select all

service nagios stop
killall -9 nagios
service ndo2db stop
service ndo2db start
service nagios start
Let us know if this fixed your problem.
Still not working

Code: Select all

#service nagios stop
Stopping nagios: done.
# killall -9 nagios
nagios: no process killed
# service ndo2db stop
Stopping ndo2db:head: cannot open `/usr/local/nagios/var/ndo2db.lock' for reading: No such file or directory
done.
# service ndo2db start
Starting ndo2db: done.
# service nagios start
Starting nagios:
 done.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Hosts and Services not appearing in views

Post by lmiltchev »

Run the following commands and show the output in code wraps:

Code: Select all

tail 20 /var/log/httpd/error_log
tail 20 /var/log/messages
tail /usr/local/nagios/var/nagios.log
Be sure to check out our Knowledgebase for helpful articles and solutions!
Keo
Posts: 33
Joined: Wed May 09, 2012 12:11 pm

Re: Hosts and Services not appearing in views

Post by Keo »

lmiltchev wrote:Run the following commands and show the output in code wraps:

Code: Select all

tail 20 /var/log/httpd/error_log
tail 20 /var/log/messages
tail /usr/local/nagios/var/nagios.log
NOTE: I omitted our host name from the log

Code: Select all

# tail -20 /var/log/httpd/error_log
[Thu Aug 29 11:13:57 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined index: min_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 108, referer: http://******/nagiosxi/includes/components/ccm/xi-index.php
[Thu Aug 29 11:13:57 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined index: max_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 109, referer: http://******/nagiosxi/includes/components/ccm/xi-index.php
[Thu Aug 29 11:13:57 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined index: avg_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 110, referer: http://******/nagiosxi/includes/components/ccm/xi-index.php
[Thu Aug 29 11:13:57 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined index: min_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 115, referer: http://******/nagiosxi/includes/components/ccm/xi-index.php
[Thu Aug 29 11:13:57 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined index: max_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 116, referer: http://******/nagiosxi/includes/components/ccm/xi-index.php
[Thu Aug 29 11:13:57 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined index: avg_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 117, referer: http://******/nagiosxi/includes/components/ccm/xi-index.php
[Thu Aug 29 11:13:57 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined index: min_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 118, referer: http://******/nagiosxi/includes/components/ccm/xi-index.php
[Thu Aug 29 11:13:57 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined index: max_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 119, referer: http://******/nagiosxi/includes/components/ccm/xi-index.php
[Thu Aug 29 11:13:57 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined index: avg_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 120, referer: http://******/nagiosxi/includes/components/ccm/xi-index.php
[Thu Aug 29 11:16:34 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined variable: startdate in /usr/local/nagiosxi/html/includes/components/graphexplorer/visFunctions.inc.php on line 135, referer: http://******/nagiosxi/includes/components/graphexplorer/
[Thu Aug 29 11:16:34 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined variable: enddate in /usr/local/nagiosxi/html/includes/components/graphexplorer/visFunctions.inc.php on line 135, referer: http://******/nagiosxi/includes/components/graphexplorer/
[Thu Aug 29 11:16:52 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined variable: startdate in /usr/local/nagiosxi/html/includes/components/graphexplorer/visFunctions.inc.php on line 135, referer: http://******/nagiosxi/includes/components/graphexplorer/
[Thu Aug 29 11:16:52 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined variable: enddate in /usr/local/nagiosxi/html/includes/components/graphexplorer/visFunctions.inc.php on line 135, referer: http://******/nagiosxi/includes/components/graphexplorer/
[Thu Aug 29 11:16:54 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined offset: 0 in /usr/local/nagiosxi/html/includes/components/bbmap/bbmap.inc.php on line 229, referer: http://******/nagiosxi/includes/components/bbmap/
[Thu Aug 29 11:17:22 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined variable: startdate in /usr/local/nagiosxi/html/includes/components/graphexplorer/visFunctions.inc.php on line 135, referer: http://******/nagiosxi/includes/components/graphexplorer/
[Thu Aug 29 11:17:22 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined variable: enddate in /usr/local/nagiosxi/html/includes/components/graphexplorer/visFunctions.inc.php on line 135, referer: http://******/nagiosxi/includes/components/graphexplorer/
[Thu Aug 29 11:17:26 2013] [error] [client 172.22.98.4] PHP Warning:  arsort() expects parameter 1 to be array, null given in /usr/local/nagiosxi/html/includes/components/latestalerts/latestalerts.inc.php on line 517, referer: http://******/nagiosxi/includes/components/latestalerts/
[Thu Aug 29 11:17:26 2013] [error] [client 172.22.98.4] PHP Warning:  Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/latestalerts/latestalerts.inc.php on line 518, referer: http://******/nagiosxi/includes/components/latestalerts/
[Thu Aug 29 11:17:26 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined variable: c in /usr/local/nagiosxi/html/includes/components/latestalerts/latestalerts.inc.php on line 521, referer: http://******/nagiosxi/includes/components/latestalerts/
[Thu Aug 29 11:20:29 2013] [error] [client 172.22.98.4] PHP Notice:  Undefined index: contactgroup_members in /usr/local/nagiosxi/html/includes/components/ccm/classes/Form_class.php on line 592, referer: http://******/nagiosxi//includes/components/ccm/?cmd=view&type=contact

Code: Select all

tail -20 /var/log/messages

returns nothing, because the file is empty.
# ls -altr /var/log/messages
-rw------- 1 root root 0 Aug 25 03:50 /var/log/messages

Code: Select all

# tail -20 /usr/local/nagios/var/nagios.log

[1377793563] Caught SIGTERM, shutting down...
[1377793563] Successfully shutdown... (PID=477)
[1377793563] Nagios 3.5.0 starting... (PID=2057)
[1377793563] Local time is Thu Aug 29 11:26:03 CDT 2013
[1377793563] LOG VERSION: 2.0
[1377793563] Error: Could not load module '/usr/local/nagios/bin/ndomod.o' -> /tmp/nebmod14BwcZ: failed to map segment from shared object: Operation not permitted
[1377793563] Warning: Host recovery notification option for contact 'nagiosadmin' doesn't make any sense - specify down and/or unreachable options as well
[1377793563] Warning: Service recovery notification option for contact 'nagiosadmin' doesn't make any sense - specify critical and/or warning options as well
[1377793563] Finished daemonizing... (New PID=2058)
[1377797163] Auto-save of retention data completed successfully.
[1377800763] Auto-save of retention data completed successfully.
[1377802849] Caught SIGTERM, shutting down...
[1377802849] Successfully shutdown... (PID=2058)
[1377802902] Nagios 3.5.0 starting... (PID=11186)
[1377802902] Local time is Thu Aug 29 14:01:42 CDT 2013
[1377802902] LOG VERSION: 2.0
[1377802902] Error: Could not load module '/usr/local/nagios/bin/ndomod.o' -> /tmp/nebmodVyRc5h: failed to map segment from shared object: Operation not permitted
[1377802902] Warning: Host recovery notification option for contact 'nagiosadmin' doesn't make any sense - specify down and/or unreachable options as well
[1377802902] Warning: Service recovery notification option for contact 'nagiosadmin' doesn't make any sense - specify critical and/or warning options as well
[1377802902] Finished daemonizing... (New PID=11187)
I think the problem resides here:

'/usr/local/nagios/bin/ndomod.o' -> /tmp/nebmodVyRc5h

Is there anyway to change this to load to /export/tmp ?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Hosts and Services not appearing in views

Post by lmiltchev »

Run the following command:

Code: Select all

chmod 777 /tmp
then restart the services again:

Code: Select all

service nagios stop
service ndo2db stop
service ndo2db start
service nagios start
Be sure to check out our Knowledgebase for helpful articles and solutions!
Keo
Posts: 33
Joined: Wed May 09, 2012 12:11 pm

Re: Hosts and Services not appearing in views

Post by Keo »

Our CIS standards wont let things be execute from /tmp. Is there anyway to have this written to another directory and ran from there?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Hosts and Services not appearing in views

Post by abrist »

It is actually nagios that is doing it. In fact, all processes fired off by nagios will do that. You can change the default location for the temp directory in:

Code: Select all

/usr/local/nagios/etc/nagios.cfg
Change:

Code: Select all

temp_path=/tmp
To:

Code: Select all

temp_path=/export/tmp
(or where ever you want)
EDIT: Don't forget to restart nagios afterwards:

Code: Select all

service nagios restart
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.
Keo
Posts: 33
Joined: Wed May 09, 2012 12:11 pm

Re: Hosts and Services not appearing in views

Post by Keo »

This resolved my problem. I have other issues, but I will open a different thread for those. Thanks for your help
Locked