nagios check_* and files limits
Mike Guthrie
mguthrie at nagios.com
Fri Dec 7 16:17:58 CET 2012
On 12/7/2012 6:02 AM, Jochen Bern wrote:
> On 06.12.2012 00:03, Mike W wrote:
>> 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.
Some of the newer distributions have additional files in
/etc/security/limits.d/ that could override settings specified in
limits.conf. I have seen a few support tickets where certain checks
require the boosting of ulimit values, although usually there's an error
that accompanies it in the nagios.log that looks something like this:
[1331755699] Warning: The check of service 'SWAP' on host 'nameserver' not could be due to Performed
to fork () error 'Resource temporarily unavailable'. The check will be rescheduled.
We've got some settings posted for users running into ulimit problems on
the following FAQ, they could be worth giving a try:
http://support.nagios.com/wiki/index.php/Nagios_XI:FAQs#Check_Services_Being_Orphaned
> According to the docs that I have at my fingertips (which mightn't apply
> to all other distribs, mind you), limits.conf affects PAM. I don't think
> that Nagios, when started as root during the boot process and probably
> setreuid()ing to user nagios, ever touches PAM. You might want to try
> increasing the ofiles limit for *root* to see whether that yields the
> result you expect. Since you intend to raise the limit above what
> currently is your default *hard* limit, at least that latter *must* be
> raised accordingly by OS means.
>
> Having that said, when some daemon - or, for that matter, plugin - needs
> some nonstandard per-process configuration, I don't see anything wrong
> with configuring it someplace where it does *not* affect the rest of the
> system (i.e., in /etc/init.d/nagios or the plugin itself). Manually
> adding "umask 022" to all init scripts was considered good practice back
> in the SunOS days ... :-}
>
> Regards,
> J. Bern
--
Mike Guthrie
Technical Team
___
Nagios Enterprises, LLC
Email: mguthrie at nagios.com
Web: www.nagios.com
------------------------------------------------------------------------------
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