Shutdown Syntax for NRPE
Lonny Selinger
lonny at bangtherockstogether.net
Thu Apr 3 22:09:03 CEST 2003
Unfortunately I dont have access to an HP machine right now :\ do a man on ps to
see what the syntax is for process listing. All it does is try to isolate the PID to
kill using the name 'nrpe' in the check so HP-UX might use a different switch then
'-e'.
Just try running that line manually to isolate the process and alter the script
accordingly. If this doesn't work for me just send off the switches and output for
ps and I can rewrite something for you.
Lonny
> Hi Lonny,
>
> Thanks for the script. I got it partially work. It will start the NRPE daemon, but
> it will not stop it.
>
> Any ideas? FYI...I am running the daemon on an HP-UX box.
>
> -----Original Message-----
> From: Lonny Selinger [mailto:lonny at bangtherockstogether.net]
> Sent: Thursday, April 03, 2003 2:37 PM
> To: Kaplan, Andrew H.
> Cc: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] Shutdown Syntax for NRPE
>
>
> Simple nrpe start/stop script ... pathes at your discretion ;)
>
> #!/bin/sh
> #
> # RC script for NRPE
> # rc.nrpe
>
> case "$1" in
> start)
> echo "Starting NRPE daemon"
> su nagios "-c /usr/local/nagios/bin/nrpe -d
> /usr/local/nagios/etc/nrpe.cfg"
>> /dev/console 2>&1 &
> ;;
> stop)
> pid=`ps -e | grep nrpe | awk '{print $1}'`
> if [ ! -z "$pid" ]; then
> echo "Stopping NRPE daemon"
> kill $pid > /dev/null 2>&1
> fi
> ;;
>
> *)
> echo "Usage: /etc/rc.nrpe { start | stop }"
> ;;
> esac
> exit 0
>
>
>> What is the correct shutdown syntax for the NRPE client?
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by: ValueWeb:
>> Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
>> No other company gives more support or power for your dedicated server
>> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
>> _______________________________________________
>> 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
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
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