[Pkg-nagios-devel] initscript problem with nagios-text 1.3-0+pre4
...
Do-Risika RAFIEFERANTSIARONJY
dourix@madacom.mg
Sun, 19 Dec 2004 14:31:44 +0300
sean finney wrote:
> hi Do-Risika,
Hi Sean,
> On Thu, Dec 16, 2004 at 03:59:52PM +0300, Do-Risika RAFIEFERANTSIARONJY wrote:
>
>>I upgraded from 1.2-3.6 to 1.3-0+pre4, and nagios could not be started
>>anymore from the init script (no error log was shown), until I changed
>>into the old daemon call style (nice -$NICENESS start-stop-daemon ...).
>
> can you try the latest version in sid (2:1.3-0+pre6)? it fixes a couple
> init-script related problems.
It behaves the same with 2:1.3-0+pre6,
madaibm:/etc/init.d# /etc/init.d/nagios start
Starting nagios: Starting /usr/sbin/nagios...
Detatching to start /usr/sbin/nagios...done.
nagios.
madaibm:/etc/init.d# ps auxw | grep nagios
nagios 24472 0.0 0.4 2920 1128 ? S Dec14 0:00
/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
root 29530 0.0 0.1 1516 488 ttyp1 S 14:21 0:00 grep nagios
madaibm:/etc/init.d#
This is what it shows when I put set -x in the initscript, apparently no
abnormal output, but there is no daemon running afterward,
madaibm:/etc/init.d# /etc/init.d/nagios start
+ set -e
+ echo -n 'Starting nagios: '
Starting nagios: + check_started
+ '[' -f /etc/nagios/check_nagios_db ']'
+ '[' -f /usr/lib/nagios/plugins/check_nagios ']'
+ /usr/lib/nagios/plugins/check_nagios -F /var/log/nagios/status.log -C
nagios
+ return 1
+ check_named_pipe
+ '[' -p /var/run/nagios/nagios.cmd ']'
+ return 0
+ check_config
+ /usr/sbin/nagios -v /etc/nagios/nagios.cfg
++ get_config nagios_user
+++ grep '^nagios_user' /etc/nagios/nagios.cfg
+++ sed 's@=@ @'
++ set -- nagios_user nagios
++ echo nagios
+ nagios_user=nagios
++ get_config nagios_group
+++ grep '^nagios_group' /etc/nagios/nagios.cfg
+++ sed 's@=@ @'
++ set -- nagios_group nagios
++ echo nagios
+ nagios_group=nagios
++ get_config log_file
+++ grep '^log_file' /etc/nagios/nagios.cfg
+++ sed 's@=@ @'
++ set -- log_file /var/log/nagios/nagios.log
++ echo /var/log/nagios/nagios.log
+ log_file=/var/log/nagios/nagios.log
++ dirname /var/log/nagios/nagios.log
+ log_dir=/var/log/nagios
+ chown -R nagios.nagios /var/log/nagios
+ return 0
+ rm -f /var/run/nagios/nagios.cmd
+ start-stop-daemon --start --verbose --nicelevel 5 --pidfile
/var/run/nagios/nagios.pid --make-pidfile --background --exec
/usr/sbin/nagios -- /etc/nagios/nagios.cfg
Starting /usr/sbin/nagios...
Detatching to start /usr/sbin/nagios...done.
+ echo nagios.
nagios.
+ exit 0
madaibm:/etc/init.d#
As I with 2:1.3-0+pre4, it runs when I change the daemon call into :
nice -$NICENESS start-stop-daemon ...,
madaibm:/etc/init.d# diff nagios.dpkg-1.3-0+pre6 nagios -u
--- nagios.dpkg-1.3-0+pre6 Sun Dec 5 08:45:19 2004
+++ nagios Sun Dec 19 14:25:57 2004
@@ -107,8 +107,8 @@
if check_config; then
rm -f $NAMEDPIPE
- start-stop-daemon --start --quiet \
- --nicelevel $NICENESS \
+ nice -$NICENESS \
+ start-stop-daemon --start --quiet \
--pidfile $PIDFILE \
--make-pidfile --background --exec $DAEMON -- $CONFIG
echo "$NAME."
madaibm:/etc/init.d#
madaibm:/etc/init.d# /etc/init.d/nagios start
Starting nagios: nagios.
madaibm:/etc/init.d# ps auxw | grep nagios
nagios 24472 0.0 0.4 2920 1128 ? S Dec14 0:00
/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
nagios 29581 3.0 0.4 2332 1248 ? SN 14:26 0:00
/usr/sbin/nagios /etc/nagios/nagios.cfg
nagios 29583 0.0 0.4 2336 1248 ? SN 14:26 0:00
/usr/sbin/nagios /etc/nagios/nagios.cfg
nagios 29584 0.0 0.1 1488 468 ? SN 14:26 0:00
/usr/lib/nagios/plugins/check_fping -H 192.168.0.9 -n 3
nagios 29585 1.0 0.2 1528 516 ? SN 14:26 0:00
/usr/bin/fping -b 56 -c 3 192.168.0.9
root 29587 0.0 0.1 1516 488 ttyp1 S 14:26 0:00 grep nagios
madaibm:/etc/init.d#
Any idea ?
Cheers,
--
DouRiX
["Destiny is an invention of the cowardly and the resigned." -- Ignazio
Silone]