Page 1 of 2
Nagios service fails to start
Posted: Tue Sep 06, 2016 6:52 am
by jannetta
Hi Folks
I decided to try and get Nagios working on a Raspberry Pi. I have followed the instructions on
http://www.myrelayman.com/download/Basi ... -Setup.txt (linked to from
http://www.myrelayman.com/download/Basi ... -Setup.txt)
Everything seems to work except that the nagios service won't start. "journalctl -xn" gives the following error: wlan0: DHCPv6 REPLY: No Addresses Available
I did some googling and found references to dnsmasq, which turned out not to be installed. I installed it and it is now running but nagios is still giving the same error so I guess dnsmasq is still not doing its thing (whatever its things is supposed to be). I'm at a bit of a loss a I don't have any knowledge of configuring dnsmasq. Can someone perhaps help me out with some guidance on what dnsmasq settings would be required to make nagios work?
Kind Regards
Jannetta
Re: Nagios service fails to start
Posted: Tue Sep 06, 2016 11:38 am
by rkennedy
What is the full output of ip a from the machine? Does it have an IP assigned to it?
Re: Nagios service fails to start
Posted: Wed Sep 07, 2016 7:23 am
by jannetta
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether b8:27:eb:44:31:e7 brd ff:ff:ff:ff:ff:ff
inet6 fe80::e8eb:a8c6:53f7:61ce/64 scope link tentative
valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:e0:4b:a2:92:fd brd ff:ff:ff:ff:ff:ff
inet 192.168.1.20/24 brd 192.168.1.255 scope global wlan0
valid_lft forever preferred_lft forever
inet6 fe80::2e0:4bff:fea2:92fd/64 scope link
valid_lft forever preferred_lft forever
Re: Nagios service fails to start
Posted: Wed Sep 07, 2016 3:28 pm
by ssax
Did you edit /etc/network/interfaces and set it to static?
Re: Nagios service fails to start
Posted: Wed Sep 07, 2016 3:52 pm
by jannetta
Yes, here is my interfaces file:
Code: Select all
auto lo
auto wlan0
iface lo inet loopback
iface eth0 inet manual
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.20
network 192.168.1.0
gateway 192.168.1.1
netmask 255.255.255.0
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Re: Nagios service fails to start
Posted: Wed Sep 07, 2016 3:54 pm
by jannetta
Yes, here is my interfaces file:
Code: Select all
auto lo
auto wlan0
iface lo inet loopback
iface eth0 inet manual
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.20
network 192.168.1.0
gateway 192.168.1.1
netmask 255.255.255.0
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Re: Nagios service fails to start
Posted: Wed Sep 07, 2016 5:04 pm
by tgriep
Can you login to the Raspberry Pi, run the following and post the output here?
Code: Select all
/etc/init.d/nagios3 configtest
/etc/init.d/nagios3 restart
Re: Nagios service fails to start
Posted: Wed Sep 07, 2016 6:25 pm
by jannetta
There is no configtest, but here goes. I tried a nagios 3 status too. It seems from the status that there are problems in the config file. I don't know what would be wrong in the config file though. I just changed it as per the instructions. I can paste the config file too if it would help.
Code: Select all
/etc/init.d/nagios3 configtest
[FAIL] Usage: /etc/init.d/nagios3 {start|stop|restart|reload|force-reload|status} ... failed!
root@nagios:~# /etc/init.d/nagios3 status
● nagios3.service - LSB: nagios host/service/network monitoring and management system
Loaded: loaded (/etc/init.d/nagios3)
Active: failed (Result: exit-code) since Wed 2016-09-07 20:49:34 UTC; 2h 23min ago
Process: 1665 ExecStart=/etc/init.d/nagios3 start (code=exited, status=1/FAILURE)
Sep 07 20:49:34 nagios nagios3[1665]: directives and data defintions. If you are upgrading from a previous
Sep 07 20:49:34 nagios nagios3[1665]: version of Nagios, you should be aware that some variables/definitions
Sep 07 20:49:34 nagios nagios3[1665]: may have been removed or modified in this version. Make sure to read
Sep 07 20:49:34 nagios nagios3[1665]: the HTML documentation regarding the config files, as well as the
Sep 07 20:49:34 nagios nagios3[1665]: 'Whats New' section to find out what has changed.
Sep 07 20:49:34 nagios systemd[1]: nagios3.service: control process exited, code=exited status=1
Sep 07 20:49:34 nagios systemd[1]: Failed to start LSB: nagios host/service/network monitoring and management system.
Sep 07 20:49:34 nagios systemd[1]: Unit nagios3.service entered failed state.
Sep 07 20:49:34 nagios nagios3[1665]: errors in config! ... failed!
Sep 07 20:49:34 nagios nagios3[1665]: failed!
root@nagios:~#
Re: Nagios service fails to start
Posted: Wed Sep 07, 2016 6:43 pm
by jannetta
Attached should be the config file. I have removed all commented lines.
Re: Nagios service fails to start
Posted: Thu Sep 08, 2016 9:46 am
by tgriep
Can you run the following command to verify the settings for the config files and post the output here?
Code: Select all
nagios -vv /etc/nagios3/nagios.cfg
You may need to add the path to the beginning of the command to where the Nagios binary file is located on the drive.