Nagios 4 fails to start on Raspberry PI

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Nagios 4 fails to start on Raspberry PI

Postby kwhogster » Wed Oct 14, 2015 7:12 pm

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

Re: Nagios 4 fails to start on Raspberry PI

Postby rkennedy » Thu Oct 15, 2015 11:27 am

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

Re: Nagios 4 fails to start on Raspberry PI

Postby kwhogster » Thu Oct 15, 2015 8:32 pm

Thank you


It is now working

now to configure Nagios to monitor my servers etc

Thanks again
kwhogster
 
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA

Re: Nagios 4 fails to start on Raspberry PI

Postby rkennedy » Fri Oct 16, 2015 9:19 am

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


Return to Community Support

Who is online

Users browsing this forum: etranzacct and 14 guests