Resolve Nagios error - Failed to start nagios.service-Unit nagios.service failed to load - No such file or directory

If you are getting this error while installing Nagios Core on RaspberryPi run these commands to resolve the error and get Nagios up and running in no time. These commands wil need to be run as ROOT. You need to restart the nagios service after you carry out the changes.

 Create this nagios.service file

# vi /etc/systemd/system/nagios.service
[Unit]
Description=Nagios
BindTo=network.target

[Install]
WantedBy=multi-user.target

[Service]
User=nagios
Group=nagios
Type=simple
ExecStart=/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg
# systemctl enable /etc/systemd/system/nagios.service
# systemctl start nagios
# systemctl status nagios

After that you need to restart the Nagios Service.

# /etc/init.d/nagios restart

That's it you should now be able to access Nagios WEBUI.

RasPi Related Articles......