Multiple Nagios proccesses running.

Andreas Ericsson ae at op5.se
Wed Jul 27 11:04:41 CEST 2005


Chris Wilson wrote:
> Hi all,
> 
> On Mon, 2005-07-25 at 23:15, Paul L. Allen wrote:
> 
>>Larry Naves writes: 
>>
>>
>>>What is the best way to keep multiple nagios processes from running:
>>
>>Don't run nagios. 
> 
> 
> Nagios is an excellent program with a small bug. This bug has existed
> for years.

It's not present in Nagios 2.x, only the older (unmaintained) version.

> NOBODY seems to be interested in squashing it.

I've patched it on quite a few occasions. The reason it's not so easy to 
fix in the distribution is that the init-script really must be portable 
to all platforms that nagios runs on.

> That's wrong.
> It's very high time that we exterminate this critter. No other
> well-written daemon has this problem.
> 

False. I know of several that happily start several processes, even 
where such processes clearly conflict with each other.

> I've posted a patch which makes a first step to fixing this, by properly
> detecting the error. The next step is to find out why the initscript
> starts a new nagios process before the old one has died, and fix that.
> 

The fix in Nagios 2.x is a bit more complete (although it uses 
"lock-file" rather than "pid-file" which is incorrect since lock-files 
are a redhat'ism).

> I'm happy to do what I can, but I need testers to help me as well.
> Anyone interested?
> 

Ethan was, and he fixed it.

To the original poster (and everybody else who might wonder about this);
Nagios 2 runs 4 threads in normal operation and fires a new process each 
time it runs a check (this can be removed with multiplexing code, which 
would greatly increase the performance of Nagios). With most 
thread-implementations on linux and *bsd, threads are separate processes 
that show up as such on the ps output. If you want to know if there are 
actually several *master* instances of Nagios running, you must use 
pstree and see how many top-level leafs there are of Nagios processes.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list