Nagios 4 fails to start on Raspberry PI

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Nagios 4 fails to start on Raspberry PI

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios 4 fails to start on Raspberry PI

Post 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.
Former Nagios Employee
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Nagios 4 fails to start on Raspberry PI

Post by kwhogster »

Thank you


It is now working

now to configure Nagios to monitor my servers etc

Thanks again
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios 4 fails to start on Raspberry PI

Post 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.
Former Nagios Employee
Locked