nagios list of process IDs must follow -p

REMY Julien julien.remy at ohs.asso.fr
Fri Jun 23 12:13:26 CEST 2006


I replaced in /etc/init.d/nagios : 

if ps -p $NagiosPID;

by

[ if ps -f $NagiosPID == "" ] || (echo "Something went wrong reading the Nagios PID from $NagiosRunFile);

Is that which is necessary that I make?

thanks

-----Message d'origine-----
De : nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-bounces at lists.sourceforge.net] De la part de Thomas Sluyter
Envoyé : vendredi 23 juin 2006 11:43
À : nagios-users at lists.sourceforge.net
Objet : Re: [Nagios-users] nagios list of process IDs must follow -p

On 23 Jun, 2006, at 11:36, REMY Julien wrote:
> In /etc/init.d/nagios :
>
> status_nagios ()
> {
>
> 	if test ! -f $NagiosRunFile; then
> 		echo "No lock file found in $NagiosRunFile"
> 		return 1
> ...
> and so on...

I know what /etc/init.d/nagios looks like, thank you :)

My point was that the "ps -p" check is currently not the most elegant  
solution to perform the check. It would be better if Ethan or someone  
else fixed the init script in the various packages, so that it would  
work properly. He could include something like:

[ -f $NagiosPID == "" ] || (echo "Something went wrong reading the  
Nagios PID from $NagiosRunFile);

Which should come right after the setting of $NagiosPID. I know, it's  
a nasty kludge, but at least it'll catch the error if $NagiosPID  
isn't read properly.

Cheers,


Thomas

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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