Public bug reported: This is a bug in the init script of the nagios4 daemon, /etc/init.d/nagios4, part of the nagios4-common package. I found this bug in version 4.3.4-3 of that package, on Ubuntu server 20.04.3 LTS.
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.d/nagios4: 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://www.mail-archive.com/search?l=debian-bugs- d...@lists.debian.org&q=subject:%22Bug%23992842%5C%3A+Slow+stop+due+to+killproc+in+%5C%2Fetc%5C%2Finit.d%5C%2Fnagios4%22&o=newest&f=1, so maybe this has been fixed upstream already. ** Affects: nagios4 (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1961557 Title: nagios4 is always stopped incorrectly, causing problems To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nagios4/+bug/1961557/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs