Re: [Nagios-devel] nagios check_* and files limits

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Re: [Nagios-devel] nagios check_* and files limits

Postby Guest » Fri Dec 07, 2012 3:18 pm

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:

> 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

This post was automatically imported from historical nagios-devel mailing list archives
Original poster:

Return to Community Support

Who is online

Users browsing this forum: EugeneD2k20, Google [Bot] and 34 guests