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.

Most Read Articles

Add/Detect a new disk in ...

Written By Farooq Mohammed Ahmed on Sunday, 11 January 2015 19:22
Add/Detect a new disk in ...

Replace SSL Certificates ...

Written By Farooq Mohammed Ahmed on Friday, 16 December 2016 08:05
Replace SSL Certificates ...

Using awk in Alias Comman...

Written By Farooq Mohammed Ahmed on Friday, 19 February 2016 14:22
Using awk in Alias Comman...

Script to Monitor Nagios ...

Written By Farooq Mohammed Ahmed on Monday, 18 July 2016 22:48
Script to Monitor Nagios ...

Generate/Create a SHA2/SH...

Written By Farooq Mohammed Ahmed on Tuesday, 25 October 2016 13:56
Generate/Create a SHA2/SH...