nagios4 is always stopped incorrectly, causing problems
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nagios4 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
This is a bug in the init script of the nagios4 daemon, /etc/init.
The nagios4 deamon is always stopped by 'kill -9'. Because this happens after a timeout, this is:
- slow
- causes unintended side effects, the main one of which is that the nagios4 retention.dat file is not written on stopping the daemon. This means that on restart of the daemon, host and service states will have reverted back to what they were the last time the retention.dat was written (by default this happens once every hour, and on stopping the daemon).
The cause of the issue is with line 149 of the init script /etc/init.
killproc -p $THEPIDFILE
This is missing '$NAME', and should read:
killproc -p $THEPIDFILE $NAME
Fixing this allows for correctly stopping the nagios4 daemon.
Note that I found the solution in the Debian bug tracker: https:/