RE [spam?] stopping and starting NDO daemon

frank.bourdeau at dga.defense.gouv.fr frank.bourdeau at dga.defense.gouv.fr
Tue Apr 21 13:50:32 CEST 2009


Hi Greg,

Here below is the script that we use at office

Hope it can help you.

#!/bin/sh
#
# ndo2db This script starts and stops the ndo2db daemon
#
# chkconfig: - 80 30
# processname: ndo2db
# description: ndo2db is a daemon process which stores Nagios data in 
MySQL \

# Source function library.
. /etc/rc.d/init.d/functions

OPTIONS="-c /usr/local/nagios/etc/ndo2db.cfg"
DAEMON=/usr/local/nagios/bin/ndo2db
NAME="NDO2DB"

[ -f $DAEMON ] || exit 0
PATH=$PATH:/usr/bin:/usr/local/bin

# By default it's all good
RETVAL=0

# See how we were called.
case "$1" in
start)
# Start daemon.
if [ -r /usr/local/nagios/var/ndo.sock ]
then
    rm /usr/local/nagios/var/ndo.sock
fi
echo -n "Starting $NAME "
daemon --user=nagios $NICELEVEL $DAEMON $OPTIONS
RETVAL=$?
echo
;;
stop)
# Stop daemons.
echo -n "Shutting down $NAME: "
killproc $DAEMON
RETVAL=$?
echo
[ $RETVAL = 0 ]
;;
restart)
$0 stop
sleep 3
$0 start
;;
condrestart)
;;
status)
status $DAEMON
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
RETVAL=1
;;
esac

exit $RETVAL


Cheers ;)


[ENVOYE PAR INTERNET]




"Frater, Greg J" <GJFRATER at bechtel.com> 
20/04/2009 21:43

A
<Nagios-users at lists.sourceforge.net>
cc

Objet
[spam?] [Nagios-users] stopping and starting NDO daemon






Hi All, 
We've just setup nagios 3 using NDO (to support Nagvis) and I realized 
that NDO does not come with an init script.  I found one post to the list 
(http://article.gmane.org/gmane.network.nagios.user/52477/match=ndo+init) 
from about a year ago, someone was asking for help incorporating the NDO 
daemon into the Nagios init script, but there were no responses.  I'm 
wondering how others are handling the stopping and starting of the NDO 
daemon?  Would it be better to incorporate it into the Nagios init script 
or should it have it's own, has somebody already done this that is willing 
to share with the list?
Thanks, 
-greg 

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090421/f7f5ac89/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
-------------- next part --------------
_______________________________________________
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