Nagios suddenly stopped working

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
dbpinochle
Posts: 3
Joined: Mon Nov 16, 2020 6:31 pm

Nagios suddenly stopped working

Post by dbpinochle »

This software was working like a champ until suddenly it didn't. I had added a couple of new hosts so like any good user I commented them out one by one, even those that had worked fine before Here is some information:

RPI 4
pi@raspberrypi:/usr/local/nagios/etc $ free -h
total used free shared buff/cache available
Mem: 855Mi 197Mi 312Mi 45Mi 344Mi 653Mi
Swap: 99Mi 1.0Mi 98Mi
pi@raspberrypi:/usr/local/nagios/etc $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Error when start
pi@raspberrypi:/usr/local/nagios/etc $ sudo systemctl start nagios
Job for nagios.service failed because the control process exited with error code.
See "systemctl status nagios.service" and "journalctl -xe" for details.
portion of nagios.cfg
# You can specify individual object config files as shown below:
cfg_file=/usr/local/nagios/etc/objects/commands.cfg
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg
#cfg_file=/usr/local/nagios/etc/objects/db1.cfg
#cfg_file=/usr/local/nagios/etc/objects/speed1.cfg
#cfg_file=/usr/local/nagios/etc/objects/kismet1.cfg
#cfg_file=/usr/local/nagios/etc/objects/boinc1.cfg
#cfg_file=/usr/local/nagios/etc/objects/cloudflare1.cfg
#cfg_file=/usr/local/nagios/etc/objects/cloudflare2.cfg
#cfg_file=/usr/local/nagios/etc/objects/kodi.cfg
pi@raspberrypi:/usr/local/nagios/etc $ sudo systemctl status nagios
● nagios.service - Nagios Core 4.4.6
Loaded: loaded (/lib/systemd/system/nagios.service; enabled; vendor preset: e
Active: failed (Result: exit-code) since Sun 2020-11-29 13:57:44 PST; 16min a
Docs: https://www.nagios.org/documentation
Process: 2171 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/e
Process: 2172 ExecStopPost=/bin/rm -f /usr/local/nagios/var/rw/nagios.cmd (cod

Nov 29 13:57:44 raspberrypi nagios[2171]: ***> One or more problems was encounte
Nov 29 13:57:44 raspberrypi nagios[2171]: Check your configuration file(s)
Nov 29 13:57:44 raspberrypi nagios[2171]: directives and data definitions.
Nov 29 13:57:44 raspberrypi nagios[2171]: version of Nagios, you should be
Nov 29 13:57:44 raspberrypi nagios[2171]: may have been removed or modified
Nov 29 13:57:44 raspberrypi nagios[2171]: the HTML documentation regarding
Nov 29 13:57:44 raspberrypi nagios[2171]: 'Whats New' section to find out w
Nov 29 13:57:44 raspberrypi systemd[1]: nagios.service: Control process exited,
Nov 29 13:57:44 raspberrypi systemd[1]: nagios.service: Failed with result 'exit
Nov 29 13:57:44 raspberrypi systemd[1]: Failed to start Nagios Core 4.4.6.
I have no idea what could have changed. I know this must be simple but direction would be appreciated.

Thanks for helping
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios suddenly stopped working

Post by scottwilkerson »

Looks like you have a problem with your configuration, what is the output of

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
dbpinochle
Posts: 3
Joined: Mon Nov 16, 2020 6:31 pm

Re: Nagios suddenly stopped working

Post by dbpinochle »

pi@raspberrypi:~ $ sudo /usr/local/nagios/bin/nagios -v /usr/local/nabvios/etc/nagios.cfg

Nagios Core 4.4.6
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2020-04-28
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Error: Cannot open main configuration file '/usr/local/nabvios/etc/nagios.cfg' for reading!
I guess it is a permissions error?
pi@raspberrypi:/usr/local/nagios/etc $ ls -al
total 84
drwxrwxr-x 3 nagios nagios 4096 Nov 29 14:13 .
drwxr-xr-x 8 root root 4096 Nov 3 11:26 ..
-rw-rw-r-- 1 nagios nagios 13710 Nov 3 11:26 cgi.cfg
-rw-r--r-- 1 root root 50 Nov 3 11:29 htpasswd.users
-rw-rw-r-- 1 nagios nagios 46253 Nov 29 13:45 nagios.cfg
drwxrwxr-x 2 nagios nagios 4096 Nov 29 13:39 objects
-rw-rw---- 1 nagios nagios 1312 Nov 3 11:26 resource.cfg
dbpinochle
Posts: 3
Joined: Mon Nov 16, 2020 6:31 pm

Re: Nagios suddenly stopped working

Post by dbpinochle »

Thanks, Scott.

Uh, ya, one of the object configuration files has incorrect information. Sorry
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios suddenly stopped working

Post by scottwilkerson »

dbpinochle wrote:Thanks, Scott.

Uh, ya, one of the object configuration files has incorrect information. Sorry
Glad it is resolved

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked