What is the correct way to kill Nagios's
When I shutdown
ndo2db I do the following:
and I see the following in
 Caught SIGTERM, shutting down...  Successfully shutdown... (PID=12422)  ndomod: Shutdown complete.  Event broker module '/usr/local/nagios/bin/ndomod.o' deinitialized successfully.
/etc/init.d/ndo2db stop outputs the following message to the console:
ndo2db was not running... could not stop
If I do
ps -ax | grep nagios I still see a ndo2db process running:
12381 ? Ss 0:00 /usr/local/nagios//bin/ndo2db -c /usr/local/nagios//etc/ndo2db.cfg
Which I then have to manually kill before restarting ndo2db, otherwise I get:
[root@nag01 nagios]# /etc/init.d/ndo2db start Starting ndo2db:Could not bind socket: Address already in use done. [root@nag01 nagios]#
Is there a cleaner way of doing this?
- Nagios 3.2.3 built from source
- NDO Utils 1.4b9 built from source
- Centreon 2.2.1 Stable
- Centos 5.5 x64
- MySQL 5.5 x64
One of the odd(?) this I've noticed is that when ndo2db and nagios are running I see two instances of ndo2db:
12753 ? Ss 0:00 /usr/local/nagios//bin/ndo2db -c /usr/local/nagios//etc/ndo2db.cfg 12792 ? S 0:00 /usr/local/nagios//bin/ndo2db -c /usr/local/nagios//etc/ndo2db.cfg
Is this normal? If so then my guess is that the
stop part of the
init.d script is only killing one process?