nagios check_* and files limits

Mike W uce_mike at yahoo.com
Thu Dec 6 00:03:06 CET 2012


I have been working to try and resolve a problem I am having with 
commands.conf entries (check_* commands). The full discussion I have had 
with more detailed notes is here:

http://support.nagios.com/forum/viewtopic.php?f=7&t=8200

One of the members suggested at this point I should post to the devel list.

The short version is this. I am getting "Warning: Return code of 127 for 
check of service" in the nagios.log. After enabling debug logs I further 
ran the command manually as user nagios and it ran fine (no permissions 
errors or missing script as normal indicated by 127 error).

End result seems to be the problem is max open files. Normally this 
would be fixed by increasing these in /etc/security/limits.conf for user 
nagios which we did (and rebooted). However this did not resolve the 
problem. I created a check script at that point to output ulimit -a and 
it repeatedly showed that the max was still 1024 even tho we had set it 
to a greater value.

As I said, manually su'ing to nagios and running the script things 
worked fine. ulimit -a also showed the proper value. It seems to only be 
an issue when it is run from nagios.

We are running on RHEL 6.2, using Nagios 3.4.3RC1, nagios-plugins 1.4.16.

The full steps I took are listed in the support forums but if you have 
questions for me I would be more than happy to answer them. At this 
point I am at a loss as to what this could be.

-- 

Mike Wilson

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d




More information about the Developers mailing list