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>