Page 2 of 2

Re: XI 5.8.6 NDO

Posted: Thu Nov 18, 2021 3:43 am
by andyb4u
The server did not have the file: /usr/lib/systemd/system/nagios.service
Or the link /etc/systemd/system/multi-user.target.wants/nagios.service

I created the /usr/lib/systemd/system/nagios.service file from another server:

Code: Select all

[Unit]
Description=Nagios Core 4.4.6
Documentation=https://www.nagios.org/documentation
After=network.target local-fs.target mariadb.service

[Service]
Type=forking
ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
ExecStop=/bin/kill -s TERM ${MAINPID}
ExecStopPost=/bin/rm -f /usr/local/nagios/var/rw/nagios.cmd
ExecReload=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
ExecReload=/bin/kill -s HUP ${MAINPID}

[Install]
WantedBy=multi-user.target


I then recreated the link /etc/systemd/system/multi-user.target.wants/nagios.service and rebooted the server and it is now working.

Thank you both for your help.

Re: XI 5.8.6 NDO

Posted: Thu Nov 18, 2021 1:04 pm
by pbroste
Hello @andyb4u

Thanks for providing the details on what you did to resolve this issue as this will help others with similar issues going forward.

I will go ahead and lock this,
Perry