Nagios, Finished daemonizing ....

We came across a weird problem in Nagios, after it was working for almost an year. Searched the web, but didn't got any head way for the problem. Every body were complaining about the issue but the resolution were not clear.

I started looking the source code, and found the function in util.c, there were different error conditions but got a hint what the problem could be.

So, all set i started the nagios service and ran strace against the pid. Soon after about 40 seconds, it vanished.

Forgot to mention we were running nagios on RHEL 5.5 32 bit linux. I checked the various options for the nagios process. There is one option for running it in the foreground. The syntax check was fine.

As soon, it was started on the foreground, it dumped with the error message "File limit ....". Couldn't remember the exact output.

There are 2 files which could be the problem, one is nagios.log or nagios.debug. Both were OK. Their is another file perfcheck.pipe or perfmon.pipe (something of this type) in /var/log/nagios.

This was the problem, as it has reached 2Gb (32 bit file system on RHEL) limit. I just rotated the file, and it was working again.

Sometimes, basics work better than a deep dive.

Comments

  1. Thank you!
    You are right. In my case I received the same log messages in nagios.log. The problem was in perfdata.log. The file reached 2GB.

    I configured the nagios.cfg with log_rotation_method=w (weekly) therefore troubles were happened.
    Now I reconfigured my nagios.cfg to log_rotation_method=d and everything is OK.

    ReplyDelete

Post a Comment

Popular posts from this blog

zpool and power path partial compatibility

Recoverpoint replication reporting with vmax splitter

Weird problem post power maintenance, no Powerpath pseudo name for Luns