Page 1 of 1

Nagios not working without any change

Posted: Tue Nov 26, 2019 3:01 am
by Andreas_
Hello, i have a problem with my nagios server.

Server is running, apache service is running, nagios service is running, but i cannot so anything on the webinterface..

with chknag - no Warnings or erros
sudo service restart nagios works without any error
sudo service nagios status = nagios is running...

but..

Code: Select all

:~$ sudo service nagios restart
Running configuration check...done.
Stopping nagios: ...done.
Starting nagios: done.

Code: Select all

service nagios restart
Running configuration check... CONFIG ERROR!  Restart aborted.  Check your Nagios configuration.

Code: Select all

 sh -x /etc/init.d/nagios start
+ test -f /etc/sysconfig/nagios
+ [ -f /etc/rc.d/init.d/functions ]
+ [ -f /etc/init.d/functions ]
+ prefix=/usr/local/nagios
+ exec_prefix=/usr/local/nagios
+ NagiosBin=/usr/local/nagios/bin/nagios
+ NagiosCfgFile=/etc/nagios/nagios.cfg
+ NagiosStatusFile=/var/nagios/status.dat
+ NagiosRetentionFile=/var/nagios/retention.dat
+ NagiosCommandFile=/var/nagios/rw/nagios.cmd
+ NagiosVarDir=/var/nagios
+ NagiosRunFile=/var/nagios/nagios.lock
+ NagiosLockDir=/var/lock/subsys
+ NagiosLockFile=nagios
+ NagiosCGIDir=/usr/local/nagios/sbin
+ NagiosUser=nagios
+ NagiosGroup=nagios
+ [ ! -f /usr/local/nagios/bin/nagios ]
+ [ ! -f /etc/nagios/nagios.cfg ]
+ echo -n Starting nagios:
Starting nagios:+ /usr/local/nagios/bin/nagios -v /etc/nagios/nagios.cfg
+ [ 126 -eq 0 ]
+ echo CONFIG ERROR!  Start aborted.  Check your Nagios configuration.
CONFIG ERROR!  Start aborted.  Check your Nagios configuration.
+ exit 1
can someone help me? there where no changes done in the config file ore something

thanks
BR

Re: Nagios not working without any change

Posted: Tue Nov 26, 2019 7:23 am
by scottwilkerson
Hello and welcome to the Nagios Forum!

You are getting a config error, can you show the output of the following?

Code: Select all

/usr/local/nagios/bin/nagios -v /etc/nagios/nagios.cfg