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......

Its now possible to install the latest version of Nagios NRPE v 3.0.1 (source install) on RaspberryPi (incl. Pixel OS).
In Raspberry Pi from version Jessie onwards the "root" login for SSH sessions (via Putty Login) has been disabled by...
If you are getting this error while installing Nagios Core on RaspberryPi run these commands to resolve the error and...
Its now possible to install latest Nagios CORE version on Raspbian by following the steps in this article. Before writing...
Wake-On-LAN (WOL) is a very useful feature if you have got a LAB at home and want to make it...