nagios list of process IDs must follow -p

Thomas Sluyter nagios at kilala.nl
Fri Jun 23 13:21:19 CEST 2006


On 23 Jun, 2006, at 12:13, REMY Julien wrote:

> 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?

No... Either I wasn't very clear, or reading english isn't your forté...

It could become something like this:

NagiosPID=`head -n 1 $NagiosRun`
[ $NagiosPID == "" ] && (echo "Something went wrong reading the  
Nagios PID from $NagiosRunFile; exit 1)

if test -x $NagiosCGI/daemonchk.cgi; then
     if $NagiosCGI/daemonchk.cgi -l $NagiosRun; then
	return 0
     else
         return 1
     fi
else
     if ps -p $NagiosPID; then
         return 0
     else
         return 1
    fi
fi
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