Nagios necesita que no existan errores de configuración para poder arrancar.

Se recomienda que se chequee la configuración antes de reiniciar el servicio.

En el siguiente ejemplo hemos intentado reiniciar Nagios después de haber tocado ficheros de configuración y se nos ha colado un error:

# /etc/init.d/nagios restart
Running configuration check... CONFIG ERROR!  Restart aborted.  Check your Nagios configuration

 

Podemos ver a que se debe ejecutando el comando:

# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios 3.0a5
Copyright (c) 1999-2007 Ethan Galstad (http://www.nagios.org)
Last Modified: 06-19-2007
License: GPL
Reading configuration data...
Error: Unexpected token or statement in file '/opt/nagios/etc/objects/hosts.cfg' on line 5.
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions.  If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version.  Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

 

El error anterior nos indica que existe un error en la línea 5 del fichero "/opt/nagios/etc/objects/hosts.cfg".

Problema semejante


al intentar reiniciar el servicio me muestra el mismo error:

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

Pero al hacer el preflight check me dice que todo está bien. Alguna idea de que pueda estar pasando?