Page 1 of 1

Nagios 4 fails to start on Raspberry PI

Posted: Wed Oct 14, 2015 7:12 pm
by kwhogster
I have a Raspberry Pi running Raspbian Jesse
Installed Nagios using this procedure

http://www.howtovmlinux.com/articles/ra ... rrypi.html

First error

pi@raspberrypi ~/nagios $ sudo make install-webconf
/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/httpd/conf.d/nagios.conf
/usr/bin/install: cannot create regular file `/etc/httpd/conf.d/nagios.conf': No such file or directory
make: *** [install-webconf] Error 1

Even tho I got this I continued that step came from the Compile the source and install it section

Then all other steps ran good

So I tried to start Nagios

root@raspberrypi:/tmp/nagios_downloads/nagios-plugins-2.0.3# /etc/init.d/nagios start
[....] Starting nagios (via systemctl): nagios.serviceFailed to start nagios.service: Unit nagios.service failed to load: No such file or directory.
failed!

tried this

root@raspberrypi:/# systemctl status nagios.service
● nagios.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
root@raspberrypi:/# service nagios start
Failed to start nagios.service: Unit nagios.service failed to load: No such file or directory.
root@raspberrypi:/#


What am I missing or doing wrong here


Thanks

Re: Nagios 4 fails to start on Raspberry PI

Posted: Thu Oct 15, 2015 11:27 am
by rkennedy
On Debian, the httpd directory isn't located at that location. Instead of running sudo make install-webconf try running sudo /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sites-enabled/nagios.conf

For your second part, try the following.

Create this file at /etc/systemd/system/nagios.service with the following contents.

Code: Select all

[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
After that, run the following commands:

Code: Select all

sudo systemctl enable /etc/systemd/system/nagios.service
sudo systemctl start nagios
sudo systemctl status nagios
This should work, let us know the result.

Re: Nagios 4 fails to start on Raspberry PI

Posted: Thu Oct 15, 2015 8:32 pm
by kwhogster
Thank you


It is now working

now to configure Nagios to monitor my servers etc

Thanks again

Re: Nagios 4 fails to start on Raspberry PI

Posted: Fri Oct 16, 2015 9:19 am
by rkennedy
You're welcome. Good to hear it's working. I will now close this out, but feel free to open another thread if you need more assistance.