nagios check_* and files limits

Ian Orszaczki ian at griggle.net
Thu Dec 6 00:58:14 CET 2012


Forgot to mention you can check the limits on a running process by reading
/proc/PID/limits.




On Thu, Dec 6, 2012 at 10:53 AM, Ian Orszaczki <ian at griggle.net> wrote:

> Hi, we had the same problem and tried to solve it with limits.d but it
> doesn't seem to work when nagios starts from the init script.
>
> So we added ulimits commands to the init script and it works.
>
> # Set limits for openfiles and processes as it is not inherited from
> limits.d
> ulimit -H -n  131072
> ulimit -S -n  131072
>
> ulimit -H -u  16384
>  ulimit -S -u  16384
>
> Cheers,
> Ian O
>
>
>
>
>
> On Thu, Dec 6, 2012 at 10:03 AM, Mike W <uce_mike at yahoo.com> wrote:
>
>> 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
>> _______________________________________________
>> Nagios-devel mailing list
>> Nagios-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nagios-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20121206/1c19a4ba/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
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
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list