No autostart on Nagios after OS upgrade
Posted: Tue Aug 18, 2020 8:22 am
Hello,
I recently upgraded my Nagios Core 4.4.5 server from Ubuntu Server 16.04 to Ubuntu Server 18.04. The Nagios install was made from source. The upgrade went fine and Nagios works on 18.04. There is one small issue though. The Nagios process doesn't autostart on boot. I have to start it manually and then everything works as normal. I'm quite sure this is no problem related to Nagios, it's probably some configuration in the operating system. But I can't figure it out. Maybe anyone here have experienced the same.
I use this to start the service "sudo systemctl start nagios.service" and it gives me no errors. So there are no problems starting the service. I have checked the logs when booting with journalctl and I can't see any errors there either. I can't see any reference that the OS is trying to start the service at all so I guess the service is not enabled or something. The output of "sudo systemctl status nagios.service" on 16.04 shows this:
The same output on 18.04 however shows this:
So it doesn't look enabled. However this is the output of "sudo systemctl is-enabled nagios.service"
There it says "enabled". But I guess something must have happened with the service during the upgrade process. When I try to enable the service I get this:
I'm not sure how to proceed from here. Does anyone of you have a clue on what's going on?
I recently upgraded my Nagios Core 4.4.5 server from Ubuntu Server 16.04 to Ubuntu Server 18.04. The Nagios install was made from source. The upgrade went fine and Nagios works on 18.04. There is one small issue though. The Nagios process doesn't autostart on boot. I have to start it manually and then everything works as normal. I'm quite sure this is no problem related to Nagios, it's probably some configuration in the operating system. But I can't figure it out. Maybe anyone here have experienced the same.
I use this to start the service "sudo systemctl start nagios.service" and it gives me no errors. So there are no problems starting the service. I have checked the logs when booting with journalctl and I can't see any errors there either. I can't see any reference that the OS is trying to start the service at all so I guess the service is not enabled or something. The output of "sudo systemctl status nagios.service" on 16.04 shows this:
Code: Select all
Loaded: loaded (/etc/init.d/nagios; bad; vendor preset: enabled)Code: Select all
Loaded: loaded (/etc/init.d/nagios; generated)Code: Select all
nagios.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install is-enabled nagios
enabledCode: Select all
nagios.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable nagios
update-rc.d: error: no runlevel symlinks to modify, aborting!