Hi,<br><br>I'm a new Nagios administrator (since feb 09).<br>Until now, every thing was quite fine. Working smoothly ... ok!<br><br>This morning I saw that during the week-end, the Nagios daemon stopped from doing checks.<br>
After some research (on the server and on the web), here is what I've got.<br>Does someone can explain me more on it ... And how not to have this problem again ...<br><br>OS : Ubuntu server 8.04.2 LTS<br>Versions : nagios-3.0.6 & nagios-plugins-1.4.13<br>
Hardware : on Vmware server infrastructure.<br><br>NTP is not set yet (I don't know if it has a side effect in my case... Because time may be involved in the problem ...).<br><br>We're monitoring at this time 12 hosts and 64 services.<br>
<br>What I can see on the web interface (In scheduling Queue) :<br> Last check Next check<br>server_xxx 2009-06-07 03:52:35 2009-06-07 09:19:45 Orphan ENABLED<br>
server_yyy service_zzz 2009-06-07 03:50:31 2009-06-07 09:19:45 Orphan ENABLED<br><br>All hosts and services except 2 are "orphan"...<br>Both "last check" and "next check" are from yesterday morning!<br>
<br>On the server:<br>$ ps auxft | grep nagios\.cfg | grep -v grep<br>nagios 20578 0.4 72.9 2969592 1505772 ? Ssl Apr30 275:20 /usr/local/nagios/bin/nagios -d /etc/nagios/nagios.cfg<br><br>-> Wow ... nagios uses 72.9% of the server's memory!<br>
<br clear="all">$ free<br> total used free shared buffers cached<br>Mem: 2062920 1636656 426264 0 4404 24532<br>-/+ buffers/cache: 1607720 455200<br>
Swap: 1951888 1450744 501144<br><br>What about forks?<br>$ pstree -aclpn<br>init,1<br>#snip<br> nagios,20578 -d /etc/nagios/nagios.cfg<br> {nagios},20579<br>#snap<br><br>What about the log ?<br>In /var/nagios/archives/nagios-06-08-2009-00.log<br>
...<br>thousands of :<br>[1244325825] Warning: The check of service 'Partition /' on host 'server_xxx' looks like it was orphaned (results never came back). I'm scheduling an immediate check of the service...<br>
and later, thousands of :<br>[1244355705] Warning: The check of service 'HTTP' on host 'server_xxx' could not be performed due to a fork() error: 'Cannot allocate memory'. The check will be rescheduled.<br>
<br>If I do a strace on process 20578, it loops with :<br>nanosleep({0, 250000000}, NULL) = 0<br>stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0<br>stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0<br>
<br>And a strace on process 20579 it loops with :<br>poll([{fd=5, events=POLLIN}], 1, 500) = 0<br><br><br>A part of the config :<br>$ egrep 'status_update|reaper|orphan' /etc/nagios/nagios.cfg <br>status_update_interval=10<br>
check_result_reaper_frequency=10<br>max_check_result_reaper_time=30<br>check_for_orphaned_services=1<br>check_for_orphaned_hosts=1<br><br><br>Thanks for any reply,<br><br>Best regards,<br>Samuel Bancal<br><br>-- <br>Samuel Bancal - CH<br>