Utilizamos cookies propias y de terceros. Al navegar entendemos que aceptas el uso de cookies. +Info.
Política de cookies
Proyecto AjpdSoft

· Inicio
· Buscar
· Contactar
· Cookies
· Descargas
· Foros
· Historia
· Nosotros
· Temas
· Top 10
· Trucos
· Tutoriales
· Usuario
· Wiki

Nick


Contraseña


Nuevo usuario


English

Nagios: Instalar Nagios, configurar Nagios para monitorizar equipos de la red
Linux


Manual que explica cómo instalar Nagios 3.0.5 en GNU Linux Ubuntu Server 8.04.1 (válido para otras versiones y distribuciones de GNU Linux). También os indicamos paso a paso cómo configurarlo para que monitorice varios equipos de nuestra red (servidor web, servidor de almacenamiento). Nagios es un sistema open source que permite monitorizar servicios de red y avisar si cambia su estado.



Instalación y configuración de Nagios para monitorizar la red

Definición de Nagios

Nagios es un sistema open source que permite monitorizar servicios de red (SMTP, POP3, HTTP, NTTP, ICMP, SNMP, etc.) y recursos de un host (carga del procesador, uso de los discos, logs del sistema, estado de los servicios, etc.). También permite notificar el cambio de estado de estos servicios a los contactos indicados, cuando se producza el cambio indicado, vía email, pager (busca), SMS, o cualquier método definido por el usuario.

 

Instalación de Nagios en GNU Linux Ubuntu Server 8.04.1

Os explicamos en este artículo cómo instalar Nagios en GNU Linux Ubuntu Server 8.04.1, para ells seguiremos los siguientes pasos:

Instalar los paquetes necesarios (Required Packages)

En primer lugar hemos de comprobar en GNU Linux que disponemos de los siguientes paquetes, necesarios para el correcto funcionamiento y administración de Nagios:

  • Apache 2.
  • GCC compiler and development libraries.
  • GD development libraries.

Para instalarlos abriremos una ventana de terminal (si tenemos el modo gráfico de Linux Ubuntu Server instalado) y escribiremos el siguiente comando (para instalar Apache 2):

sudo apt-get install apache2

Si ya está instalado mostrará un mensaje como este:

Leyendo lista de paquetes...
Creando árbol de dependencias...
Leyendo la información de estado...
apache2 ya está en su versión más reciente.
0 actualizados, 0 se instalarán, 0 para eliminar y 22 no actualizados.

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Instalar los paquetes necesarios (Required Packages)

Este otro:

sudo apt-get install libapache2-mod-php5

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Instalar los paquetes necesarios (Required Packages)

Y este otro para instalar GCC y GD:

sudo apt-get install build-essential

Si aparece este error:

... 404 Not Found.
No se pudieron obtener algunos archivos, ¿quizás deba ejecutar apt-get update o deba intentarlo de nuevo con --fix-missing?

Ejecutaremos el comando:

sudo apt-get update

Y volveremos a ejecutar el comando anterior. El resultado de la ejecución del comando la puedes ver aquí.

 

Nota 1: para la versión de Ubuntu 6.10 deberemos ejecutar:

sudo apt-get install libgd2-dev

Nota 2: para la versión de Ubuntu 7.10, el nombre de la la librería gd2 es libgd2-xpm-dev, con lo cual el comando a ejecutar sería:

sudo apt-get install libgd2-xpm-dev

Crear usuario y grupo de seguridad para nagios (Account information)

A continuación crearemos un usuario del sistema Linux para el uso de Nagios (con nombre "nagios" y con contraseña "nagios"), para ello ejecutaremos el siguiente comando:

sudo /usr/sbin/useradd -m nagios

Para establecer la contraseña del usuario "nagios" creado escribiremos el comando Linux:

sudo passwd nagios

 

Crearemos también un grupo de seguridad llamado "nagios":

sudo /usr/sbin/groupadd nagios

Y añadiremos el usuario "nagios" a este grupo con el comando:

sudo /usr/sbin/usermod -G nagios nagios

Crearemos otro grupo de seguridad para permitirle la ejecución de comandos externos a través de la interfaz web, con nombre "nagcmd":

sudo /usr/sbin/groupadd nagcmd

Añadiremos al grupo creado anteriormente el usuario "nagios":

sudo /usr/sbin/usermod -G nagcmd nagios

También agregaremos a este grupo el usuario de Apache "www-data":

sudo /usr/sbin/usermod -G nagcmd www-data

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Crear usuario y grupo de seguridad para nagios (Account information)

Descargar fichero instalación Nagios y los plugin necesarios

Tras preparar el sistema Linux instalando los paquetes necesarios y creando los grupos y usuarios, procederemos a descargar el fichero de instalación de Nagios y los Plugin. Para ello, desde la línea de comandos, en primer lugar nos crearemos una carpeta para guardar las descargas, con el comando:

sudo mkdir decargas_nagios

Accedemos al directorio creado con:

cd descargas_nagios

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Descargar fichero instalación Nagios y los plugin necesarios

Y ejecutaremos el siguiente comando para descargar desde Internet el fichero comprimido de instalación de Nagios 3.0.5 (necesitaremos disponer de conexión a Internet en el equipo Linux Ubuntu):

sudo wget http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-3.0.5.tar.gz

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Descargar fichero instalación Nagios y los plugin necesarios

Descargaremos también los Plugins de nagios, con el comando:

sudo wget http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.13.tar.gz

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Descargar fichero instalación Nagios y los plugin necesarios

Antes de continuar, para evitar problemas de permisos en la carpeta donde hemos descargado los ficheros de Nagios, ejecutaremos el comando:

sudo chmod /descargas_nagios 777

Compilar e instalar Nagios

Para finalizar el proceso de instalación de Nagios 3.0.5 descomprimiremos los ficheros descargados y los compilaremos. Para descomprimirlos ejecutaremos el siguiente comando:

tar xzf nagios-3.0.5.tar.gz

Accederemos a la carpeta que ha creado el comando anterior:

cd nagios-3.0.5

Ejecutaremos el script de configuración de Nagios, pasándole como parámetro el nombre del grupo creado anteriormente:

./configure --with-command-group=nagcmd

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Compilar e instalar Nagios

Puedes ver el resultado de la ejecución del comando anterior aquí.

Compilamos el código fuente de Nagios con el comando:

make all

Puedes ver el resultado de la ejecución del comando anterior aquí.

Instalamos los ficheros binarios y HTML:

make install

Puedes ver el resultado de la salida de la ejecución del comando anterior aquí.

Instalamos los script de inicio:

make install-init

Puedes ver el resultado de la salida de la ejecución del comando anterior aquí.

Los ficheros de configuración de ejemplo:

make install-config

Puedes ver el resultado de la salida de la ejecución del comando anterior aquí.

Este comando creará los archivos cgi.cfg, nagios.cfg, resource.cfg de configuración en la carpeta /usr/local/nagios/etc

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Compilar e instalar Nagios

Es necesario que el usuario "nagios" creado anteriormente tenga permisos de lectura/escritura sobre estos archivos .cfg, el siguiente script realizará esa tarea:

make install-commandmode

Puedes ver el resultado de la salida de la ejecución del comando anterior aquí.

Configurar la interfaz web (Web Interface)

Para instalar la interfaz web de administración de Nagios, configurando el fichero conf.d de Apache, ejecutaremos el siguiete comando:

sudo make install-webconf

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Configurar la interfaz web (Web Interface)

Puedes ver el resultado de la salida de la ejecución del comando anterior aquí.

Con el siguiente comando crearemos una cuenta de usuario para acceder a la configuración de Nagios desde la interfaz web. Al ejecutar este comando nos pedirá que introduzcamos una contraseña, que será la que utilicemos para acceder a la interfaz web de Nagios:

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Configurar la interfaz web (Web Interface)n

Puedes ver el resultado de la salida de la ejecución del comando anterior aquí.

Para que los cambios tengan efecto reiniciaremos el servicio de Apache, con el comando:

/etc/init.d/apache2 reload

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Configurar la interfaz web (Web Interface)

Si todo es correcto nos devolverá algo así:

* Reloading web server config apache2 [ OK ]

 

Compilar e instalar los Plugins de Nagios

Accederemos a la carpeta donde hemos descargado el fichero que contiene los plugins de Nagios, con el comando:

cd /descargas_nagios

Descomprimiremos el fichero descargado nagios-plugins-1.4.13.tar.gz con el comando:

tar xzf nagios-plugins-1.4.13.tar.gz

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Compilar e instalar los Plugins de Nagios

Accederemos a la carpeta creada con la descompresión:

cd nagios-plugins-1.4.13

A continuación compilaremos e instalaremos los plugins de Nagios con el comando:

sudo ./configure --with-nagios-user=nagios --with-nagios-group=nagios

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Compilar e instalar los Plugins de Nagios

Puedes ver el resultado de la salida de la ejecución del comando anterior aquí.

A continuación ejecutaremos:

make

y luego:

make install

Iniciar Nagios

Si queremos que el servicio de Nagios se ejecute automáticamente cada vez que reiniciemos el equipo, ejecutaremos el siguiente comando:

sudo ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios

Verificaremos los ficheros de configuración de ejemplo que incluye Nagios, con el comando:

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

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Iniciar Nagios

Puedes ver el resultado de la salida de la ejecución del comando anterior aquí.

Si no hay errores (lo indica al final del comando con "Total Warnings" y "Total Errors") podremos iniciar Nagios con el comando:

/etc/init.d/nagios start

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Iniciar Nagios

Si todo es correcto mostrará:

Starting nagios: done.

Acceso a la administración web de Nagios

Una vez instalado e iniciado Nagios, podremos acceder a la web de administración desde cualquier equipo de la red, tanto con sistema operativo Windows como GNU Linux. En nuestro caso accederemos a Nagios desde un equipo con Windows XP SP3, para ello abriremos un navegador web (como Mozilla Firefox) y escribiremos la siguiente URL:

http://192.168.1.111/nagios

Donde "192.168.1.111" será la IP del equipo donde hayamos instalado Nagios.

Nos pedirá usuario y contraseña, intriduciremos en "Nombre de usuario" el usuario creado en pasos anteriores "nagiosadmin" y la contreseña introducida al crearlo:

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Acceso a la administración web

El aspecto de la página principal de administración de Nagios versión 3.0.5, desde este página podremos ver el estado actual de los servicios monitorizados, entre otras cosas:

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Acceso a la administración web

Pulsando en "Service Detail" podremos ver los servicios y equipos actualmente monitorizados por Nagios. Tras la instalación, Nagios sólo monitoriza (como ejemplo) el propio equipo donde ha sido instalado y, dentro de este equipo, monitoriza los servicios de HTTP, PING, SSH, Swap Usage, Total Processes:

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Acceso a la administración web

 

Cómo configurar Nagios para monitorizar varios servidores

Fichero de configuración principal nagios.cfg

Desde el servidor con GNU Linux y Nagios, abriremos una ventana de terminal y accederemos a la carpeta que contiene los ficheros de configuración de Nagios, con el comando:

cd /usr/local/nagios/etc

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Cómo configurar Nagios para monitorizar varios servidores

En primer lugar editaremos el fichero de configuración principal de Nagios (mainfile) llamado "nagios.cfg", lo podremos hacer con cualquier editor, por ejemplo:

sudo nano /usr/local/nagios/etc/nagios.cfg

En este fichero deberemos indicar la carpeta de ficheros .cfg ó el fichero de extensión .cfg que contendrá los hosts que monitorizaremos. En nuestro caso añadiremos una carpeta completa:

/usr/local/nagios/etc/hosts

Para ello añadiremos la siguiente línea (en cualquier parte del fichero nagios.cfg):

cfg_dir=/usr/local/nagios/etc/hosts

Guardaremos los cambios con "Control + O" y cerramos nano GNU nano con "Control + X".

Desde este fichero podremos configurar todos los parámetros generales de Nagios.

Ficheros de grupos hosts, hosts, servidores, equipos, dispositivos a monitorizar

Para indicar a Nagios los servidores, equipos o dispositivos a monitorizar, crearemos la carpeta "hosts", con el comando:

sudo mkdir /usr/local/nagios/etc/hosts

(que es la carpeta donde hemos indicado en nagios.cfg que contendrá los hosts)

Accederemos a ella con:

cd /usr/local/nagios/etc/hosts

En esta carpeta crearemos dos ficheros, por un lado crearemos el fichero que contendrá los grupos de hosts (para agrupar los servidores por "tipo"), por ejemplo con el nombre "grupos.cfg", para ello escribiremos el siguiente comando:

sudo nano /usr/local/nagios/etc/hosts/grupos.cfg

En el editor escribiremos:

define hostgroup {
  hostgroup_name	terminal-server
  alias			Servidores de Terminal Server
  members 		srvts1
}


define hostgroup {
  hostgroup_name	almacenamiento
  alias			Servidores de Almacenamiento
  members 		srvdatos1, srvdatos2
}


define hostgroup {
  hostgroup_name	base-datos
  alias			Servidores de Base de Datos
  members 		srvbd1
}

define hostgroup {
  hostgroup_name	electronica_red
  alias			Electrónica de red (routers, switchs)
  members 		router_oficina
}

Os explicamos cada parámetro:

  • hostgroup_name: nombre interno del grupo de hosts.
  • alias: nombre que se mostrará para identificar el grupo de hosts.
  • members: nombre de los hosts (definidos en el mismo u otro fichero de configuración) que pertenecerán a este grupo.

Obviamente, no sabremos los "members" hasta que no creemos el fichero de configuración con los hosts a monitorizar por Nagios. Este fichero "grupos.cfg" podremos editarlo en cualquier momento y agregar los miembros que deseemos.

Crearemos ahora un nuevo fichero con el nombre que queramos y la extensión .cfg, este fichero contendrá la configuración necesaria para agregar los distintos servidores y dispositivos a la monitorización de Nagios. Crearemos este fichero con:

sudo nano /usr/local/nagios/etc/hosts/servidores.cfg

Agregaremos lo siguiente al fichero:

define host {
  host_name               	srvdatos1
  alias                   	srvdatos1
  address                 	192.168.1.2
  check_command           	check-host-alive
  max_check_attempts      	10
  notification_interval   	0
  notification_period     	24x7
  notification_options    	d,u,r
  notifications_enabled		1
  contact_groups				contactos_almacenamiento
}

define host {
  host_name               	srvdatos2
  alias                   	srvdatos2
  address                 	192.168.1.2
  check_command           	check-host-alive
  max_check_attempts      	10
  notification_interval   	0
  notification_period     	24x7
  notification_options    	d,u,r
  notifications_enabled		1
  contact_groups				contactos_almacenamiento
}

define host {
  host_name               	srvbd1
  alias                   	srvbd1
  address                 	192.168.1.100
  check_command           	check-host-alive
  max_check_attempts      	10
  notification_interval   	0
  notification_period     	24x7
  notification_options    	d,u,r
  notifications_enabled		1
  contact_groups				contactos_base_datos
}

define host {
  host_name               	srvts1
  alias                   	srvts1
  address                 	192.168.1.150
  check_command           	check-host-alive
  max_check_attempts      	10
  notification_interval   	0
  notification_period     	24x7
  notification_options    	d,u,r
  notifications_enabled		1
  contact_groups				contactos_terminal_server
}

define host {
  host_name               	router_oficina
  alias                   	router_oficina
  address                 	192.168.1.1
  check_command           	check-host-alive
  max_check_attempts      	10
  notification_interval   	0
  notification_period     	24x7
  notification_options    	d,u,r
  notifications_enabled		1
  contact_groups				contactos_routers
}

A continuación explicamos algunos de los parámetros:

  • host_name: nombre interno del hosts (servidor o dispositivo).
  • alias: nombre que identificará el host en el administrador de Nagios.
  • address: dirección IP del host o dispositivo.
  • check_command: comando que se utilizará para comprobar la disponibilidad del host o dispositivo, normalmente "check-host-alive".
  • notifications_enabled: habiltar / deshabilitar las notificaciones en caso de caída de este host o dispositivo ("1" habilitadas las notificaciones, "0" deshabilitadas las notificaciones).
  • contact_groups: grupo de contactos a los que se notificará en caso de caída del host o dispositivo.
En este fichero definiremos todos los host (servidores o pcs que queramos monitorizar) y todos los dispositivos (impresoras de red con IP propia, switch con IP, routers, etc.). Por supuesto, se pueden separar en tantos ficheros .cfg como deseemos, puesto que hemos configurado Nagios (nagios.cfg) para que utilice todos los ficheros .cfg de la carpeta /usr/local/nagios/etc/hosts.

Fichero de grupos de contactos y contactos

Deberemos crear también los grupos de contactos, podremos hacerlo en la misma carpeta donde hemos creado los grupos de hosts y hosts, accederemos a esta carpeta:

cd /usr/local/nagios/etc/hosts

Crearemos aquí un fichero con los grupos de contactos, llamado "grupos_contactos.cfg":

sudo nano /usr/local/nagios/etc/hosts/grupos_contactos.cfg

En este fichero introduciremos algo así:

define contactgroup {
	contactgroup_name		contactos_almacenamiento
	alias					Contactos aviso servidores almacenamiento
	members					ajpdsoft, fernando
}

define contactgroup {
	contactgroup_name		contactos_base_datos
	alias					Contactos aviso servidores Base de Datos
	members					fernando, alonso
}

define contactgroup {
	contactgroup_name		contactos_routers
	alias					Contactos aviso Electronica de red
	members					ajpdsoft, fernando, alonso
}
 

Creando todos los grupos de contactos, para el aviso (en caso de caída) de los servicios, hosts, dispositivos monitorizados. Lo normal es que, dependiendo del servidor a monitorizar, haya que avisar a un grupo u otro de contactos. Por ejemplo, en una organización con cuatro técncios dedidcados a administración de redes y tres técnicos dedicados a administración de base de datos, lo normal será crear dos grupos de contactos, uno para el aviso en caso de caída de la electrónica de red (administradores de redes) y otro para aviso en caso de caída del servidor (o los servicios) de la base de datos (administradores de base de datos).

A continuación crearemos otro fichero que contendrá los contactos propiamente dichos y la información de cada uno (email, nombre, etc.):

sudo nano /usr/local/nagios/etc/hosts/contactos.cfg

Con el contenido:

define contact {
  contact_name                    	alonso
  alias                           	Alonso J.
  host_notifications_enabled		1
  service_notifications_enabled		1
  service_notification_period     	24x7
  host_notification_period        	24x7
  service_notification_options    	w,u,c,r
  host_notification_options       	d,u,r
  service_notification_commands   	notificar_email
  host_notification_commands      	notificar_email
  email								alonso_t@ajpdsoft.com
  can_submit_commands				1
}

define contact {
  contact_name                    	ajpdsoft
  alias                           	AjpdSoft
  host_notifications_enabled		1
  service_notifications_enabled		1
  service_notification_period     	24x7
  host_notification_period        	24x7
  service_notification_options    	w,u,c,r
  host_notification_options       	d,u,r
  service_notification_commands   	notificar_email
  host_notification_commands      	notificar_email
  email								ajpdsoft@ajpdsoft.com
  can_submit_commands				1
}

define contact {
  contact_name                    	fernando
  alias                           	Fernando Alonso
  host_notifications_enabled		1
  service_notifications_enabled		1
  service_notification_period     	24x7
  host_notification_period        	24x7
  service_notification_options    	w,u,c,r
  host_notification_options       	d,u,r
  service_notification_commands   	notificar_email
  host_notification_commands      	notificar_email
  email								fernando@ajpdsoft.com
  can_submit_commands				1
}

Definición de los comandos

En el paso anterior, para el contacto, en el parámetro "service_notification_commands" hemos establecido el comando "notificar_por_email" que hay que definir. Para ello crearemos un nuevo fichero que llamaremos "comandos.cfg" que contendrá todos los comandos que utilicemos definidos:

sudo nano /usr/local/nagios/etc/hosts/comandos.cfg

Con el contenido:

define command {
	command_name	notificar_email
	command_line	/usr/bin/printf "%b" "Nagios\n\nTipo: $NOTIFICATIONTYPE$\n
\nServicio: $SERVICEDESC$\nHost: $HOSTALIAS$
\nIP: $HOSTADDRESS$\nEstado: $SERVICESTATE$\n\nFecha: $DATETIME$\n\n
Información:\n\n$OUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$
alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$ }
 

 

Nota: el contenido anterior para el parámetro "command_line" va en una sola línea, lo hemos partido para que la línea no quede excesivamente larga en la visulazación del navegador.

Verificación de la configuración introducida

Para que los cambios tengan efecto en Nagios, en primer lugar comprobaremos que la sintaxis introducida es correcta, para ello utilizaremos el comando:

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

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Verificación de la configuración introducida

Deberemos asegurarnos de que al compilar no aparezcan errores:

Total Errors: 0

A continuación os mostramos algunos de los posibles errores al compilar los ficheros de configuración de Nagios.

Posibles errores de configuración y su causa y solución

Si hay algún error de sintaxis en algunos de los ficheros .cfg, el comando de verificación anterior nos mostrará algo así:

Nagios 3.0.5
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 11-04-2008
License: GPL

Reading configuration data...

Error: Invalid hostgroup object directive '{'.
Error: Could not add object property in file '/usr/local/nagios/etc/hosts/grupos.cfg' on line 2.

***> 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.

Indicando el fichero y la línea del fichero donde está el error de sintaxis y el error que se ha producido.

Si no encuentra un host en el fichero servidores.cfg de los indicados en "members" del fichero grupos.cfg mostrará algo así:

Reading configuration data...

Error: Could not find any host matching 'srvts1' (config file '/usr/local/nagios/etc/hosts/grupos.cfg', starting on line 1)
Error: Could not expand members specified in hostgroup (config file '/usr/local/nagios/etc/hosts/grupos.cfg', starting on line 1)

***> One or more problems was encountered while processing the config files...

Si no encuentra un grupo de contactos (contact_groups) para notificación de los hosts, mostrará algo así:

Reading configuration data...

Running pre-flight check on configuration data...

Checking services...
Checked 8 services.
Checking hosts...
Error: Contact group 'contactos_routers' specified in host 'router_oficina' is not defined anywhere!
Error: Contact group 'contactos_base_datos' specified in host 'srvbd1' is not defined anywhere!
Error: Contact group 'contactos_almacenamiento' specified in host 'srvdatos1' is not defined anywhere!
Error: Contact group 'contactos_almacenamiento' specified in host 'srvdatos2' is not defined anywhere!
Error: Contact group 'contactos_terminal_server' specified in host 'srvts1' is not defined anywhere!

Si no se ha asociado ningún servicio a un host mostrará un warning (permite iniciar Nagios, es un aviso):

Reading configuration data...

Running pre-flight check on configuration data...

Checking services...
Checked 8 services.
Checking hosts...
Warning: Host 'router_oficina' has no services associated with it!
Warning: Host 'srvbd1' has no services associated with it!
Warning: Host 'srvdatos1' has no services associated with it!
Warning: Host 'srvdatos2' has no services associated with it!
Warning: Host 'srvts1' has no services associated with it!

Si se produce algún error, como los anteriores, lo solucionaremos editando los ficheros de configuración .cfg (servidores.cfg, grupos.cfg, etc.) indicados en el propio error. Normalmente el comando de verificación suele indicarnos el motivo del error, el fichero donde se produce e incluso la línea del fichero. Tras editarlo y guardar los cambios volveremos a verificar los ficheros con el siguiente comando, hasta que no haya errores (sí puede haber warnings):

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

Reinicio servicio Nagios y comprobación de la monitorización de los hosts añadidos

Una vez verificados los ficheros de configuración de Nagios para que no haya errores, reiniciaremos el servicio para que se apliquen los cambios, con el comando:

/etc/init.d/nagios restart

Devolverá algo así:

Running configuration check... done.
Stopping nagios: done.
Starting nagios: done.

Ahora podremos acceder a la administración web de Nagios y veremos los nuevos hosts y dispositivos añadidos (desde "Host Detail"):

AjpdSoft Instalación y configuración de Nagios para monitorizar la red - Reinicio servicio Nagios y comprobación de la monitorización de los hosts añadidos

En nuestro caso, hemos configurado los host para que se compruebe su estado mediante un PING, si alguno no está disponible en la red, Nagios, mostrará una aviso como este:

CRITICAL - Host Unreachable (192.168.1.150)

Si el host o dispositivo responde al PING correctamente, Nagios, mostrará un mensage como este en "Status Information":

PING OK - Packet loss = 0%, RTA = 0.16 ms

 

ANEXO

Salida del comando: sudo apt-get install build-essential

Leyendo lista de paquetes...
Creando árbol de dependencias...
Leyendo la información de estado...
Se instalarán los siguientes paquetes extras:
binutils cpp-4.2 dpkg-dev g++ g++-4.2 gcc gcc-4.2 gcc-4.2-base libc6
libc6-dev libc6-i686 libgcc1 libgomp1 libstdc++6 libstdc++6-4.2-dev
libtimedate-perl linux-libc-dev make patch
Paquetes sugeridos:
binutils-doc gcc-4.2-locales debian-keyring g++-multilib g++-4.2-multilib
gcc-4.2-doc libstdc++6-4.2-dbg autoconf automake1.9 bison flex gcc-doc
gcc-multilib gdb libtool manpages-dev gcc-4.2-multilib libgcc1-dbg
libgomp1-dbg libmudflap0-4.2-dev libmudflap0-dbg glibc-doc
libstdc++6-4.2-doc make-doc diff-doc
Se instalarán los siguientes paquetes NUEVOS:
binutils build-essential dpkg-dev g++ g++-4.2 gcc gcc-4.2 libc6-dev libgomp1
libstdc++6-4.2-dev libtimedate-perl linux-libc-dev make patch
Se actualizarán los siguientes paquetes:
cpp-4.2 gcc-4.2-base libc6 libc6-i686 libgcc1 libstdc++6
6 actualizados, 14 se instalarán, 0 para eliminar y 44 no actualizados.
Se necesita descargar 17,1MB/19,4MB de archivos.
After this operation, 44,7MB of additional disk space will be used.
Des:1 http://es.archive.ubuntu.com hardy-updates/main gcc-4.2-base 4.2.4-1ubuntu3 [100kB]
Des:2 http://es.archive.ubuntu.com hardy-updates/main libgcc1 1:4.2.4-1ubuntu3 [23,3kB]
Des:3 http://es.archive.ubuntu.com hardy-updates/main cpp-4.2 4.2.4-1ubuntu3 [2486kB]
Des:4 http://es.archive.ubuntu.com hardy-updates/main libstdc++6 4.2.4-1ubuntu3 [332kB]
Des:5 http://es.archive.ubuntu.com hardy-updates/main libc6 2.7-10ubuntu4 [4307kB]
Des:6 http://es.archive.ubuntu.com hardy-updates/main libc6-i686 2.7-10ubuntu4 [1243kB]
Des:7 http://es.archive.ubuntu.com hardy-updates/main linux-libc-dev 2.6.24-22.45 [699kB]
Des:8 http://es.archive.ubuntu.com hardy-updates/main libc6-dev 2.7-10ubuntu4 [3344kB]
Des:9 http://es.archive.ubuntu.com hardy-updates/main libgomp1 4.2.4-1ubuntu3 [12,0kB]
Des:10 http://es.archive.ubuntu.com hardy-updates/main gcc-4.2 4.2.4-1ubuntu3 [596kB]
Des:11 http://es.archive.ubuntu.com hardy-updates/main libstdc++6-4.2-dev 4.2.4-1ubuntu3 [1187kB]
Des:12 http://es.archive.ubuntu.com hardy-updates/main g++-4.2 4.2.4-1ubuntu3 [2784kB]
Preconfigurando paquetes ...
Descargados 17,1MB en 47s (360kB/s)
(Leyendo la base de datos ...
18147 ficheros y directorios instalados actualmente.)
Preparando para reemplazar gcc-4.2-base 4.2.3-2ubuntu7 (usando .../gcc-4.2-base_4.2.4-1ubuntu3_i386.deb) ...
Desempaquetando el reemplazo de gcc-4.2-base ...
Configurando gcc-4.2-base (4.2.4-1ubuntu3) ...
(Leyendo la base de datos ...
18147 ficheros y directorios instalados actualmente.)
Preparando para reemplazar libgcc1 1:4.2.3-2ubuntu7 (usando .../libgcc1_1%3a4.2.4-1ubuntu3_i386.deb) ...
Desempaquetando el reemplazo de libgcc1 ...
Configurando libgcc1 (1:4.2.4-1ubuntu3) ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
(Leyendo la base de datos ...
18147 ficheros y directorios instalados actualmente.)
Preparando para reemplazar cpp-4.2 4.2.3-2ubuntu7 (usando .../cpp-4.2_4.2.4-1ubuntu3_i386.deb) ...
Desempaquetando el reemplazo de cpp-4.2 ...
Preparando para reemplazar libstdc++6 4.2.3-2ubuntu7 (usando .../libstdc++6_4.2.4-1ubuntu3_i386.deb) ...
Desempaquetando el reemplazo de libstdc++6 ...
Configurando libstdc++6 (4.2.4-1ubuntu3) ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
(Leyendo la base de datos ...
18146 ficheros y directorios instalados actualmente.)
Preparando para reemplazar libc6 2.7-10ubuntu3 (usando .../libc6_2.7-10ubuntu4_i386.deb) ...
Desempaquetando el reemplazo de libc6 ...
Configurando libc6 (2.7-10ubuntu4) ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
(Leyendo la base de datos ...
18146 ficheros y directorios instalados actualmente.)
Preparando para reemplazar libc6-i686 2.7-10ubuntu3 (usando .../libc6-i686_2.7-10ubuntu4_i386.deb) ...
Desempaquetando el reemplazo de libc6-i686 ...
Seleccionando el paquete binutils previamente no seleccionado.
Desempaquetando binutils (de .../binutils_2.18.1~cvs20080103-0ubuntu1_i386.deb) ...
Seleccionando el paquete linux-libc-dev previamente no seleccionado.
Desempaquetando linux-libc-dev (de .../linux-libc-dev_2.6.24-22.45_i386.deb) ...
Seleccionando el paquete libc6-dev previamente no seleccionado.
Desempaquetando libc6-dev (de .../libc6-dev_2.7-10ubuntu4_i386.deb) ...
Seleccionando el paquete libgomp1 previamente no seleccionado.
Desempaquetando libgomp1 (de .../libgomp1_4.2.4-1ubuntu3_i386.deb) ...
Seleccionando el paquete gcc-4.2 previamente no seleccionado.
Desempaquetando gcc-4.2 (de .../gcc-4.2_4.2.4-1ubuntu3_i386.deb) ...
Seleccionando el paquete gcc previamente no seleccionado.
Desempaquetando gcc (de .../gcc_4%3a4.2.3-1ubuntu6_i386.deb) ...
Seleccionando el paquete libstdc++6-4.2-dev previamente no seleccionado.
Desempaquetando libstdc++6-4.2-dev (de .../libstdc++6-4.2-dev_4.2.4-1ubuntu3_i386.deb) ...
Seleccionando el paquete g++-4.2 previamente no seleccionado.
Desempaquetando g++-4.2 (de .../g++-4.2_4.2.4-1ubuntu3_i386.deb) ...
Seleccionando el paquete g++ previamente no seleccionado.
Desempaquetando g++ (de .../g++_4%3a4.2.3-1ubuntu6_i386.deb) ...
Seleccionando el paquete make previamente no seleccionado.
Desempaquetando make (de .../make_3.81-3build1_i386.deb) ...
Seleccionando el paquete libtimedate-perl previamente no seleccionado.
Desempaquetando libtimedate-perl (de .../libtimedate-perl_1.1600-9_all.deb) ...
Seleccionando el paquete patch previamente no seleccionado.
Desempaquetando patch (de .../patch_2.5.9-4_i386.deb) ...
Seleccionando el paquete dpkg-dev previamente no seleccionado.
Desempaquetando dpkg-dev (de .../dpkg-dev_1.14.16.6ubuntu4_all.deb) ...
Seleccionando el paquete build-essential previamente no seleccionado.
Desempaquetando build-essential (de .../build-essential_11.3ubuntu1_i386.deb) ...
Configurando cpp-4.2 (4.2.4-1ubuntu3) ...
Configurando libc6-i686 (2.7-10ubuntu4) ...
Configurando binutils (2.18.1~cvs20080103-0ubuntu1) ...
Configurando linux-libc-dev (2.6.24-22.45) ...
Configurando libc6-dev (2.7-10ubuntu4) ...
Configurando libgomp1 (4.2.4-1ubuntu3) ...
Configurando gcc-4.2 (4.2.4-1ubuntu3) ...
Configurando gcc (4:4.2.3-1ubuntu6) ...
Configurando make (3.81-3build1) ...
Configurando libtimedate-perl (1.1600-9) ...
Configurando patch (2.5.9-4) ...
Configurando dpkg-dev (1.14.16.6ubuntu4) ...
Configurando libstdc++6-4.2-dev (4.2.4-1ubuntu3) ...
Configurando g++-4.2 (4.2.4-1ubuntu3) ...
Configurando g++ (4:4.2.3-1ubuntu6) ...
Configurando build-essential (11.3ubuntu1) ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place

 

Salida del comando ./configure --with-command-group=nagcmd

checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether make sets $(MAKE)... yes
checking for strip... /usr/bin/strip
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking pthreads.h usability... no
checking pthreads.h presence... no
checking for pthreads.h... no
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking socket.h usability... no
checking socket.h presence... no
checking for socket.h... no
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for sys/types.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking for sys/wait.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/msg.h usability... yes
checking sys/msg.h presence... yes
checking for sys/msg.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking uio.h usability... no
checking uio.h presence... no
checking for uio.h... no
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking for va_copy... yes
checking for vsnprintf... yes
checking for snprintf... yes
checking for asprintf... yes
checking for vasprintf... yes
checking for C99 vsnprintf... yes
checking for initgroups... yes
checking for setenv... yes
checking for strdup... yes
checking for strstr... yes
checking for strtoul... yes
checking for unsetenv... yes
checking for type of socket size... size_t
checking for pthread_create in -lcma... no
checking for pthread_create in -lpthread... yes
checking for library containing nanosleep... none required
checking for mail... no
We'll use default routines (in xdata/xsddefault.*) for status data I/O...
We'll use default routines (in xdata/xcddefault.*) for comment data I/O...
We'll use default routines (in xdata/xrddefault.*) for retention data I/O...
We'll use template-based routines (in xdata/xodtemplate.*) for object data I/O...
We'll use default routines (in xdata/xpddefault.*) for performance data I/O...
We'll use default routines (in xdata/xdddefault.*) for scheduled downtime data I/O...
checking for main in -liconv... no
checking for gdImagePng in -lgd (order 1)... no
checking for gdImagePng in -lgd (order 2)... no
checking for gdImagePng in -lgd (order 3)... no
checking for gdImagePng in -lgd (order 4)... no

*** GD, PNG, and/or JPEG libraries could not be located... *********

Boutell's GD library is required to compile the statusmap, trends
and histogram CGIs. Get it from http://www.boutell.com/gd/, compile
it, and use the --with-gd-lib and --with-gd-inc arguments to specify
the locations of the GD library and include files.

NOTE: In addition to the gd-devel library, you'll also need to make
sure you have the png-devel and jpeg-devel libraries installed
on your system.

NOTE: After you install the necessary libraries on your system:
1. Make sure /etc/ld.so.conf has an entry for the directory in
which the GD, PNG, and JPEG libraries are installed.
2. Run 'ldconfig' to update the run-time linker options.
3. Run 'make clean' in the Nagios distribution to clean out
any old references to your previous compile.
4. Rerun the configure script.

NOTE: If you can't get the configure script to recognize the GD libs
on your system, get over it and move on to other things. The
CGIs that use the GD libs are just a small part of the entire
Nagios package. Get everything else working first and then
revisit the problem. Make sure to check the nagios-users
mailing list archives for possible solutions to GD library
problems when you resume your troubleshooting.

********************************************************************

checking ltdl.h usability... no
checking ltdl.h presence... no
checking for ltdl.h... no
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for dlopen in -ldl... yes
checking for extra flags needed to export symbols... -Wl,-export-dynamic
checking for linker flags for loadable modules... -shared
checking for traceroute... no
checking for type va_list... yes
checking for perl... /usr/bin/perl
configure: creating ./config.status
config.status: creating Makefile
config.status: creating subst
config.status: creating pkginfo
config.status: creating base/Makefile
config.status: creating common/Makefile
config.status: creating contrib/Makefile
config.status: creating cgi/Makefile
config.status: creating html/Makefile
config.status: creating module/Makefile
config.status: creating xdata/Makefile
config.status: creating daemon-init
config.status: creating html/index.html
config.status: creating html/side.html
config.status: creating include/config.h
config.status: include/config.h is unchanged
config.status: creating include/snprintf.h
config.status: include/snprintf.h is unchanged
config.status: creating include/cgiutils.h
config.status: include/cgiutils.h is unchanged

Creating sample config files in sample-config/ ...

*** Configuration summary for nagios 3.0.5 11-04-2008 ***:

General Options:
-------------------------
Nagios executable: nagios
Nagios user/group: nagios,nagios
Command user/group: nagios,nagcmd
Embedded Perl: no
Event Broker: yes
Install ${prefix}: /usr/local/nagios
Lock file: ${prefix}/var/nagios.lock
Check result directory: ${prefix}/var/spool/checkresults
Init directory: /etc/init.d
Apache conf.d directory: /etc/apache2/conf.d
Mail program: /bin/mail
Host OS: linux-gnu

Web Interface Options:
------------------------
HTML URL: http://localhost/nagios/
CGI URL: http://localhost/nagios/cgi-bin/
Traceroute (used by WAP):

Review the options above for accuracy. If they look okay,
type 'make all' to compile the main program and CGIs.

 

Salida del comando make all

cd ./base && make
make[1]: Entering directory `/descargas_nagios/nagios-3.0.5/base'
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o broker.o broker.c
make[1]: Leaving directory `/descargas_nagios/nagios-3.0.5/base'
cd ./base && make
make[1]: Entering directory `/descargas_nagios/nagios-3.0.5/base'
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o broker.o broker.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o nebmods.o nebmods.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o checks.o checks.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o config.o config.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o commands.o commands.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o events.o events.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o flapping.o flapping.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o logging.o logging.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o macros-base.o ../common/macros.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o notifications.o notifications.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o sehandlers.o sehandlers.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o skiplist.o ../common/skiplist.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o utils.o utils.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o retention-base.o sretention.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o xretention-base.o ../xdata/xrddefault.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o comments-base.o ../common/comments.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o xcomments-base.o ../xdata/xcddefault.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o objects-base.o ../common/objects.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o xobjects-base.o ../xdata/xodtemplate.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o statusdata-base.o ../common/statusdata.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o xstatusdata-base.o ../xdata/xsddefault.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o perfdata-base.o perfdata.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o xperfdata-base.o ../xdata/xpddefault.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o downtime-base.o ../common/downtime.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o xdowntime-base.o ../xdata/xdddefault.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -o nagios nagios.c broker.o nebmods.o checks.o config.o
commands.o events.o flapping.o logging.o macros-base.o notifications.o sehandlers.o skiplist.o
utils.o retention-base.o xretention-base.o comments-base.o xcomments-base.o objects-base.o
xobjects-base.o statusdata-base.o xstatusdata-base.o perfdata-base.o xperfdata-base.o
downtime-base.o xdowntime-base.o -Wl,-export-dynamic -lm -lpthread -ldl
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -o nagiostats nagiostats.c -lm
make[1]: Leaving directory `/descargas_nagios/nagios-3.0.5/base'
cd ./cgi && make
make[1]: Entering directory `/descargas_nagios/nagios-3.0.5/cgi'
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -c -o getcgi.o getcgi.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -c -o cgiutils.o cgiutils.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -c -o cgiauth.o cgiauth.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -c -o macros-cgi.o ../common/macros.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -c -o skiplist.o ../common/skiplist.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -c -o objects-cgi.o ../common/objects.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -c -o xobjects-cgi.o ../xdata/xodtemplate.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -c -o statusdata-cgi.o ../common/statusdata.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -c -o xstatusdata-cgi.o ../xdata/xsddefault.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -c -o comments-cgi.o ../common/comments.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -c -o downtime-cgi.o ../common/downtime.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -o avail.cgi avail.c getcgi.o cgiutils.o cgiauth.o
macros-cgi.o skiplist.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o
xstatusdata-cgi.o comments-cgi.o downtime-cgi.o
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -c -o extcmd_list.o extcmd_list.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -o cmd.cgi cmd.c extcmd_list.o getcgi.o cgiutils.o
cgiauth.o macros-cgi.o skiplist.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o
xstatusdata-cgi.o comments-cgi.o downtime-cgi.o
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -o config.cgi config.c getcgi.o cgiutils.o cgiauth.o
macros-cgi.o skiplist.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o
comments-cgi.o downtime-cgi.o
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -o extinfo.cgi extinfo.c getcgi.o cgiutils.o cgiauth.o macros-cgi.o
skiplist.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -o history.cgi history.c getcgi.o cgiutils.o cgiauth.o macros-cgi.o
skiplist.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -o notifications.cgi notifications.c getcgi.o cgiutils.o cgiauth.o
macros-cgi.o skiplist.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -o outages.cgi outages.c getcgi.o cgiutils.o cgiauth.o macros-cgi.o
skiplist.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -o showlog.cgi showlog.c getcgi.o cgiutils.o cgiauth.o macros-cgi.o
skiplist.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -o status.cgi status.c getcgi.o cgiutils.o cgiauth.o macros-cgi.o
skiplist.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -o statuswml.cgi statuswml.c getcgi.o cgiutils.o cgiauth.o macros-cgi.o
skiplist.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -o summary.cgi summary.c getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o
objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -o tac.cgi tac.c getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o
objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o
gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -o statuswrl.cgi statuswrl.c getcgi.o cgiutils.o cgiauth.o macros-cgi.o
skiplist.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o -lm
make[1]: Leaving directory `/descargas_nagios/nagios-3.0.5/cgi'
cd ./html && make
make[1]: Entering directory `/descargas_nagios/nagios-3.0.5/html'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/descargas_nagios/nagios-3.0.5/html'
if [ xyes = xyes ]; then \
cd ./module && make; \
fi
make[1]: Entering directory `/descargas_nagios/nagios-3.0.5/module'
gcc -fPIC -g -O2 -DHAVE_CONFIG_H -o helloworld.o helloworld.c -shared
make[1]: Leaving directory `/descargas_nagios/nagios-3.0.5/module'

*** Compile finished ***

If the main program and CGIs compiled without any errors, you
can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):

make install
- This installs the main program, CGIs, and HTML files

make install-init
- This installs the init script in /etc/init.d

make install-commandmode
- This installs and configures permissions on the
directory for holding the external command file

make install-config
- This installs *SAMPLE* config files in /usr/local/nagios/etc
You'll have to modify these sample files before you can
use Nagios. Read the HTML documentation for more info
on doing this. Pay particular attention to the docs on
object configuration files, as they determine what/how
things get monitored!

make install-webconf
- This installs the Apache config file for the Nagios
web interface

*** Support Notes *******************************************

If you have questions about configuring or running Nagios,
please make sure that you:

- Look at the sample config files
- Read the HTML documentation
- Read the FAQs online at http://www.nagios.org/faqs

before you post a question to one of the mailing lists.
Also make sure to include pertinent information that could
help others help you. This might include:

- What version of Nagios you are using
- What version of the plugins you are using
- Relevant snippets from your config files
- Relevant error messages from the Nagios log file

For more information on obtaining support for Nagios, visit:

http://www.nagios.org/support/

*************************************************************

Enjoy.

 

Salida del comando make install

cd ./base && make install
make[1]: Entering directory `/descargas_nagios/nagios-3.0.5/base'
make install-basic
make[2]: Entering directory `/descargas_nagios/nagios-3.0.5/base'
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o nagios -g nagios nagios /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o nagios -g nagios nagiostats /usr/local/nagios/bin
make[2]: Leaving directory `/descargas_nagios/nagios-3.0.5/base'
make strip-post-install
make[2]: Entering directory `/descargas_nagios/nagios-3.0.5/base'
/usr/bin/strip /usr/local/nagios/bin/nagios
/usr/bin/strip /usr/local/nagios/bin/nagiostats
make[2]: Leaving directory `/descargas_nagios/nagios-3.0.5/base'
make[1]: Leaving directory `/descargas_nagios/nagios-3.0.5/base'
cd ./cgi && make install
make[1]: Entering directory `/descargas_nagios/nagios-3.0.5/cgi'
make install-basic
make[2]: Entering directory `/descargas_nagios/nagios-3.0.5/cgi'
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/sbin
for file in *.cgi; do \
/usr/bin/install -c -m 775 -o nagios -g nagios $file /usr/local/nagios/sbin; \
done
make[2]: Leaving directory `/descargas_nagios/nagios-3.0.5/cgi'
make strip-post-install
make[2]: Entering directory `/descargas_nagios/nagios-3.0.5/cgi'
for file in *.cgi; do \
/usr/bin/strip /usr/local/nagios/sbin/$file; \
done
make[2]: Leaving directory `/descargas_nagios/nagios-3.0.5/cgi'
make[1]: Leaving directory `/descargas_nagios/nagios-3.0.5/cgi'
cd ./html && make install
make[1]: Entering directory `/descargas_nagios/nagios-3.0.5/html'
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/media
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/stylesheets
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/contexthelp
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/docs
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/docs/images
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/images
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/images/logos
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/ssi
/usr/bin/install -c -m 664 -o nagios -g nagios robots.txt /usr/local/nagios/share
/usr/bin/install -c -m 664 -o nagios -g nagios docs/robots.txt /usr/local/nagios/share/docs
for file in *.html; \
do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share; done
for file in stylesheets/*.css; \
do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/stylesheets; done
for file in contexthelp/*.html; \
do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/contexthelp; done
for file in docs/*.html; \
do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/docs; done
for file in docs/images/*.*; \
do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/docs/images; done
for file in images/*.gif; \
do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/images; done
for file in images/*.jpg; \
do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/images; done
for file in images/*.png; \
do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/images; done
for file in images/*.ico; \
do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/images; done
for file in images/logos/*.*; \
do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/images/logos; done
make[1]: Leaving directory `/descargas_nagios/nagios-3.0.5/html'
make install-basic
make[1]: Entering directory `/descargas_nagios/nagios-3.0.5'
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/libexec
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var/archives
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var/spool/checkresults
if [ no = yes ]; then \
/usr/bin/install -c -m 664 -o nagios -g nagios p1.pl /usr/local/nagios/bin; \
fi;

*** Main program, CGIs and HTML files installed ***

You can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):

make install-init
- This installs the init script in /etc/init.d

make install-commandmode
- This installs and configures permissions on the
directory for holding the external command file

make install-config
- This installs sample config files in /usr/local/nagios/etc

make[1]: Leaving directory `/descargas_nagios/nagios-3.0.5'


Salida del comando make install-init

/usr/bin/install -c -m 755 -d -o root -g root /etc/init.d
/usr/bin/install -c -m 755 -o root -g root daemon-init /etc/init.d/nagios

*** Init script installed ***

 

Salida del comando make install-config

/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc/objects
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/nagios.cfg /usr/local/nagios/etc/nagios.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/cgi.cfg /usr/local/nagios/etc/cgi.cfg
/usr/bin/install -c -b -m 660 -o nagios -g nagios sample-config/resource.cfg /usr/local/nagios/etc/resource.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/templates.cfg /usr/local/nagios/etc/objects/templates.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/commands.cfg /usr/local/nagios/etc/objects/commands.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/contacts.cfg /usr/local/nagios/etc/objects/contacts.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/timeperiods.cfg /usr/local/nagios/etc/objects/timeperiods.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/localhost.cfg /usr/local/nagios/etc/objects/localhost.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/windows.cfg /usr/local/nagios/etc/objects/windows.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/printer.cfg /usr/local/nagios/etc/objects/printer.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/switch.cfg /usr/local/nagios/etc/objects/switch.cfg

*** Config files installed ***

Remember, these are *SAMPLE* config files. You'll need to read
the documentation for more information on how to actually define
services, hosts, etc. to fit your particular needs.


Salida del comando make install-commandmode

/usr/bin/install -c -m 775 -o nagios -g nagcmd -d /usr/local/nagios/var/rw
chmod g+s /usr/local/nagios/var/rw

*** External command directory configured ***

Salida del comando htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Adding password for user nagiosadmin

Salida del comando make install-webconf

/usr/bin/install -c -m 644 sample-config/http.conf /etc/apache2/conf.d/nagios.conf

*** Nagios/Apache conf files installed ***

Salida del comando sudo ./configure --with-nagios-user=nagios --with-nagios-group=nagios

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether gcc needs -traditional... no
checking for a sed that does not truncate output... /bin/sed
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... (cached) ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking whether gcc and cc understand -c and -o together... yes
checking for error_at_line... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for working strtod... yes
checking for python... /usr/bin/python
checking for sh... /bin/sh
checking for perl... /usr/bin/perl
checking for libgnutls-config... no
checking for hostname... /bin/hostname
checking for basename... /usr/bin/basename
checking for main in -ldce... no
checking for main in -lnsl... yes
checking for socket in -lsocket... no
checking for main in -lresolv... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking for floor in -lm... yes
checking for main in -lcrypt... yes
checking for PQsetdbLogin in -lpq... no
checking for rc_read_config in -lradiusclient... no
checking for rc_read_config in -lradiusclient-ng... no
checking for main in -lldap... no
checking linux/hdreg.h usability... yes
checking linux/hdreg.h presence... yes
checking for linux/hdreg.h... yes
checking linux/types.h usability... yes
checking linux/types.h presence... yes
checking for linux/types.h... yes
checking for mysql_config... no
checking for IPv6 support... yes
checking krb5.h usability... no
checking krb5.h presence... no
checking for krb5.h... no
checking krb5.h usability... no
checking krb5.h presence... no
checking for krb5.h... no
checking for dlopen in -ldl... yes
checking for shl_load in -ldl... no
checking openssl/ssl.h usability... no
checking openssl/ssl.h presence... no
checking for openssl/ssl.h... no
checking openssl/x509.h usability... no
checking openssl/x509.h presence... no
checking for openssl/x509.h... no
checking openssl/rsa.h usability... no
checking openssl/rsa.h presence... no
checking for openssl/rsa.h... no
checking openssl/pem.h usability... no
checking openssl/pem.h presence... no
checking for openssl/pem.h... no
checking openssl/crypto.h usability... no
checking openssl/crypto.h presence... no
checking for openssl/crypto.h... no
checking openssl/err.h usability... no
checking openssl/err.h presence... no
checking for openssl/err.h... no
checking ssl.h usability... no
checking ssl.h presence... no
checking for ssl.h... no
checking x509.h usability... no
checking x509.h presence... no
checking for x509.h... no
checking rsa.h usability... no
checking rsa.h presence... no
checking for rsa.h... no
checking pem.h usability... no
checking pem.h presence... no
checking for pem.h... no
checking crypto.h usability... no
checking crypto.h presence... no
checking for crypto.h... no
checking err.h usability... yes
checking err.h presence... yes
checking for err.h... yes
checking for CRYPTO_lock in -lcrypto... no
checking gnutls/openssl.h usability... no
checking gnutls/openssl.h presence... no
checking for gnutls/openssl.h... no
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking uio.h usability... no
checking uio.h presence... no
checking for uio.h... no
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking features.h usability... yes
checking features.h presence... yes
checking for features.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking sys/unistd.h usability... yes
checking sys/unistd.h presence... yes
checking for sys/unistd.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking for an ANSI C-conforming const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for mbstate_t... yes
checking for va_copy... yes
checking for memmove... yes
checking for select... yes
checking for socket... yes
checking for strdup... yes
checking for strstr... yes
checking for strtol... yes
checking for strtoul... yes
checking for floor... no
checking for poll... yes
checking return type of socket size... int
checking for ps... /bin/ps
checking for ps syntax... /bin/ps axwo 'stat uid pid ppid vsz rss pcpu comm args'
checking for ping... /bin/ping
checking for ping6... /bin/ping6
checking for ICMP ping syntax... /bin/ping -n -U -w %d -c %d %s
checking for ICMPv6 ping syntax... /bin/ping6 -n -U -w %d -c %d %s
checking for nslookup... /usr/bin/nslookup
checking for nslookup syntax... /usr/bin/nslookup -sil
checking for number of cpus... sysconf(_SC_NPROCESSORS_CONF)
checking for uptime... /usr/bin/uptime
checking for rpcinfo... /usr/bin/rpcinfo
checking for lmstat... no
checking for smbclient... no
checking for who... /usr/bin/who
checking for snmpget... no
checking for snmpgetnext... no
checking for quakestat... no
checking for qstat... no
checking for fping... no
checking for ssh... /usr/bin/ssh
checking for mailq... no
checking for qmail-qstat... no
checking for swap... no
checking for swapinfo... no
checking for lsps... no
checking for sys/stat.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for sys/swap.h... yes
checking whether swapctl is declared... no
checking for swaptbl_t... no
checking for swapent_t... no
checking for struct swapent.se_nblks... no
checking for /proc/meminfo... found /proc/meminfo
checking for dig... /usr/bin/dig
checking for apt-get... /usr/bin/apt-get
checking sys/sockio.h usability... no
checking sys/sockio.h presence... no
checking for sys/sockio.h... no
checking whether NLS is requested... yes
checking for msgfmt... no
checking for gmsgfmt... :
checking for xgettext... no
checking for msgmerge... no
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for working alloca.h... yes
checking for alloca... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking for sys/param.h... (cached) yes
checking sys/vfs.h usability... yes
checking sys/vfs.h presence... yes
checking for sys/vfs.h... yes
checking sys/fs_types.h usability... no
checking sys/fs_types.h presence... no
checking for sys/fs_types.h... no
checking for sys/socket.h... (cached) yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for math.h... (cached) yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for stdint.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking for inline... inline
checking for C/C++ restrict keyword... __restrict
checking whether system is Windows or MSDOS... no
checking whether // is distinct from /... no
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... yes
checking whether the preprocessor supports include_next... yes
checking whether <sys/socket.h> is self-contained... yes
checking for IPv4 sockets... yes
checking for IPv6 sockets... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking for getopt_long_only... yes
checking whether optreset is declared... no
checking for working GNU getopt function... yes
checking whether getenv is declared... yes
checking for nl_langinfo and CODESET... yes
checking whether getc_unlocked is declared... yes
checking whether we are using the GNU C Library 2.1 or newer... yes
checking whether malloc, realloc, calloc are POSIX compliant... yes
checking for isblank... yes
checking for iswctype... yes
checking for mbrtowc... yes
checking for wcrtomb... yes
checking for wcscoll... yes
checking for pipe... yes
checking for vasnprintf... no
checking for iswcntrl... yes
checking for ssize_t... yes
checking whether snprintf is declared... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for long long int... yes
checking for unsigned long long int... yes
checking whether strdup is declared... yes
checking for working strerror function... yes
checking whether strndup is declared... yes
checking whether strnlen is declared... yes
checking for EOVERFLOW... yes
checking for wchar_t... yes
checking for wint_t... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for intmax_t... yes
checking whether vsnprintf is declared... yes
checking for alloca as a compiler built-in... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking whether // is distinct from /... (cached) no
checking for error_at_line... (cached) yes
checking whether floorf is declared... yes
checking for sys/mount.h... yes
configure: checking how to get file system space usage
checking for statvfs function (SVR4)... no
checking for 3-argument statfs function (DEC OSF/1)... no
checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)... yes
checking dustat.h usability... no
checking dustat.h presence... no
checking for dustat.h... no
checking sys/fs/s5param.h usability... no
checking sys/fs/s5param.h presence... no
checking for sys/fs/s5param.h... no
checking sys/filsys.h usability... no
checking sys/filsys.h presence... no
checking for sys/filsys.h... no
checking sys/statfs.h usability... yes
checking sys/statfs.h presence... yes
checking for sys/statfs.h... yes
checking for statfs that truncates block counts... no
configure: checking how to do getaddrinfo, freeaddrinfo and getnameinfo
checking for library containing getaddrinfo... none required
checking for getaddrinfo... yes
checking for gai_strerror (possibly via ws2tcpip.h)... yes
checking for library containing gethostbyname... none required
checking for library containing getservbyname... none required
checking for gethostbyname... yes
checking whether getaddrinfo is declared... yes
checking whether freeaddrinfo is declared... yes
checking whether gai_strerror is declared... yes
checking whether getnameinfo is declared... yes
checking for struct addrinfo... yes
checking for gethostname... yes
checking for getloadavg... yes
checking for pstat_getdynamic... no
checking for kstat_open in -lkstat... no
checking for perfstat_cpu_total in -lperfstat... no
checking for getloadavg... yes
checking whether getloadavg requires setgid... no
checking for inet_ntop... yes
checking whether inet_ntop is declared... yes
checking whether the compiler generally respects inline... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for listmntent... no
checking for getmntinfo... no
checking for sys/ucred.h... no
checking for sys/mount.h... (cached) yes
checking mntent.h usability... yes
checking mntent.h presence... yes
checking for mntent.h... yes
checking for sys/fs_types.h... (cached) no
checking for struct fsstat.f_fstypename... no
checking for library containing getmntent... none required
checking for getmntent... yes
checking for listmntent of Cray/Unicos-9... no
checking for mntctl function and struct vmount... no
checking for one-argument getmntent function... yes
checking sys/mntent.h usability... no
checking sys/mntent.h presence... no
checking for sys/mntent.h... no
checking for struct statfs.f_fstypename... no
checking whether <netinet/in.h> is self-contained... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for working re_compile_pattern... yes
checking for stdint.h... (cached) yes
checking for SIZE_MAX... yes
checking for snprintf... yes
checking for socklen_t... yes
checking for ssize_t... (cached) yes
checking whether stdint.h conforms to C99... yes
checking for strdup... (cached) yes
checking for working strndup... yes
checking for working strnlen... yes
checking whether <sys/socket.h> is self-contained... (cached) yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for ptrdiff_t... yes
checking for snprintf... (cached) yes
checking for wcslen... yes
checking whether _snprintf is declared... no
checking for vasprintf... yes
checking for vsnprintf... yes
checking whether <wchar.h> is standalone... yes
checking for stdint.h... (cached) yes
configure: creating ./config.status
config.status: creating gl/Makefile
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating plugins/Makefile
config.status: creating lib/tests/Makefile
config.status: creating plugins-root/Makefile
config.status: creating plugins-scripts/Makefile
config.status: creating plugins-scripts/subst
config.status: creating plugins-scripts/utils.pm
config.status: creating plugins-scripts/utils.sh
config.status: creating perlmods/Makefile
config.status: creating command.cfg
config.status: creating test.pl
config.status: creating pkg/solaris/pkginfo
config.status: creating po/Makefile.in
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
--with-apt-get-command: /usr/bin/apt-get
--with-ping6-command: /bin/ping6 -n -U -w %d -c %d %s
--with-ping-command: /bin/ping -n -U -w %d -c %d %s
--with-ipv6: yes
--with-mysql: no
--with-openssl: no
--with-gnutls: no
--enable-extra-opts: no
--with-perl: /usr/bin/perl
--enable-perl-modules: no
--with-cgiurl: /nagios/cgi-bin
--with-trusted-path: /bin:/sbin:/usr/bin:/usr/sbin

Salida del comando sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios 3.0.5
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 11-04-2008
License: GPL

Reading configuration data...

Running pre-flight check on configuration data...

Checking services...
Checked 8 services.
Checking hosts...
Checked 1 hosts.
Checking host groups...
Checked 1 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 24 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

Ejemplo fichero nagios.cfg

##############################################################################
#
# NAGIOS.CFG - Sample Main Config File for Nagios 3.0.5
#
# Read the documentation for more information on this configuration
# file. I've provided some comments here, but things may not be so
# clear without further explanation.
#
# Last Modified: 10-15-2008
#
##############################################################################

# LOG FILE
# This is the main log file where service and host events are logged
# for historical purposes. This should be the first option specified
# in the config file!!!

log_file=/usr/local/nagios/var/nagios.log

 

# OBJECT CONFIGURATION FILE(S)
# These are the object configuration files in which you define hosts,
# host groups, contacts, contact groups, services, etc.
# You can split your object definitions across several config files
# if you wish (as shown below), or keep them all in a single config file.

# 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

# Definitions for monitoring the local (Linux) host
cfg_file=/usr/local/nagios/etc/objects/localhost.cfg

# Definitions for monitoring a Windows machine
#cfg_file=/usr/local/nagios/etc/objects/windows.cfg

# Definitions for monitoring a router/switch
#cfg_file=/usr/local/nagios/etc/objects/switch.cfg

# Definitions for monitoring a network printer
#cfg_file=/usr/local/nagios/etc/objects/printer.cfg

# You can also tell Nagios to process all config files (with a .cfg
# extension) in a particular directory by using the cfg_dir
# directive as shown below:

#cfg_dir=/usr/local/nagios/etc/servers
#cfg_dir=/usr/local/nagios/etc/printers
#cfg_dir=/usr/local/nagios/etc/switches
#cfg_dir=/usr/local/nagios/etc/routers

 

# OBJECT CACHE FILE
# This option determines where object definitions are cached when
# Nagios starts/restarts. The CGIs read object definitions from
# this cache file (rather than looking at the object config files
# directly) in order to prevent inconsistencies that can occur
# when the config files are modified after Nagios starts.

object_cache_file=/usr/local/nagios/var/objects.cache

 

# PRE-CACHED OBJECT FILE
# This options determines the location of the precached object file.
# If you run Nagios with the -p command line option, it will preprocess
# your object configuration file(s) and write the cached config to this
# file. You can then start Nagios with the -u option to have it read
# object definitions from this precached file, rather than the standard
# object configuration files (see the cfg_file and cfg_dir options above).
# Using a precached object file can speed up the time needed to (re)start
# the Nagios process if you've got a large and/or complex configuration.
# Read the documentation section on optimizing Nagios to find our more
# about how this feature works.

precached_object_file=/usr/local/nagios/var/objects.precache

 

# RESOURCE FILE
# This is an optional resource file that contains $USERx$ macro
# definitions. Multiple resource files can be specified by using
# multiple resource_file definitions. The CGIs will not attempt to
# read the contents of resource files, so information that is
# considered to be sensitive (usernames, passwords, etc) can be
# defined as macros in this file and restrictive permissions (600)
# can be placed on this file.

resource_file=/usr/local/nagios/etc/resource.cfg

 

# STATUS FILE
# This is where the current status of all monitored services and
# hosts is stored. Its contents are read and processed by the CGIs.
# The contents of the status file are deleted every time Nagios
# restarts.

status_file=/usr/local/nagios/var/status.dat

 

# STATUS FILE UPDATE INTERVAL
# This option determines the frequency (in seconds) that
# Nagios will periodically dump program, host, and
# service status data.

status_update_interval=10

 

# NAGIOS USER
# This determines the effective user that Nagios should run as.
# You can either supply a username or a UID.

nagios_user=nagios

 

# NAGIOS GROUP
# This determines the effective group that Nagios should run as.
# You can either supply a group name or a GID.

nagios_group=nagios

 

# EXTERNAL COMMAND OPTION
# This option allows you to specify whether or not Nagios should check
# for external commands (in the command file defined below). By default
# Nagios will *not* check for external commands, just to be on the
# cautious side. If you want to be able to use the CGI command interface
# you will have to enable this.
# Values: 0 = disable commands, 1 = enable commands

check_external_commands=1

 

# EXTERNAL COMMAND CHECK INTERVAL
# This is the interval at which Nagios should check for external commands.
# This value works of the interval_length you specify later. If you leave
# that at its default value of 60 (seconds), a value of 1 here will cause
# Nagios to check for external commands every minute. If you specify a
# number followed by an "s" (i.e. 15s), this will be interpreted to mean
# actual seconds rather than a multiple of the interval_length variable.
# Note: In addition to reading the external command file at regularly
# scheduled intervals, Nagios will also check for external commands after
# event handlers are executed.
# NOTE: Setting this value to -1 causes Nagios to check the external
# command file as often as possible.

#command_check_interval=15s
command_check_interval=-1

 

# EXTERNAL COMMAND FILE
# This is the file that Nagios checks for external command requests.
# It is also where the command CGI will write commands that are submitted
# by users, so it must be writeable by the user that the web server
# is running as (usually 'nobody'). Permissions should be set at the
# directory level instead of on the file, as the file is deleted every
# time its contents are processed.

command_file=/usr/local/nagios/var/rw/nagios.cmd

 

# EXTERNAL COMMAND BUFFER SLOTS
# This settings is used to tweak the number of items or "slots" that
# the Nagios daemon should allocate to the buffer that holds incoming
# external commands before they are processed. As external commands
# are processed by the daemon, they are removed from the buffer.

external_command_buffer_slots=4096

 

# LOCK FILE
# This is the lockfile that Nagios will use to store its PID number
# in when it is running in daemon mode.

lock_file=/usr/local/nagios/var/nagios.lock

 

# TEMP FILE
# This is a temporary file that is used as scratch space when Nagios
# updates the status log, cleans the comment file, etc. This file
# is created, used, and deleted throughout the time that Nagios is
# running.

temp_file=/usr/local/nagios/var/nagios.tmp

 

# TEMP PATH
# This is path where Nagios can create temp files for service and
# host check results, etc.

temp_path=/tmp

 

# EVENT BROKER OPTIONS
# Controls what (if any) data gets sent to the event broker.
# Values: 0 = Broker nothing
# -1 = Broker everything
# <other> = See documentation

event_broker_options=-1

 

# EVENT BROKER MODULE(S)
# This directive is used to specify an event broker module that should
# by loaded by Nagios at startup. Use multiple directives if you want
# to load more than one module. Arguments that should be passed to
# the module at startup are seperated from the module path by a space.
#
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#
# Do NOT overwrite modules while they are being used by Nagios or Nagios
# will crash in a fiery display of SEGFAULT glory. This is a bug/limitation
# either in dlopen(), the kernel, and/or the filesystem. And maybe Nagios...
#
# The correct/safe way of updating a module is by using one of these methods:
# 1. Shutdown Nagios, replace the module file, restart Nagios
# 2. Delete the original module file, move the new module file into place, restart Nagios
#
# Example:
#
# broker_module=<modulepath> [moduleargs]

#broker_module=/somewhere/module1.o
#broker_module=/somewhere/module2.o arg1 arg2=3 debug=0

 

# LOG ROTATION METHOD
# This is the log rotation method that Nagios should use to rotate
# the main log file. Values are as follows..
# n = None - don't rotate the log
# h = Hourly rotation (top of the hour)
# d = Daily rotation (midnight every day)
# w = Weekly rotation (midnight on Saturday evening)
# m = Monthly rotation (midnight last day of month)

log_rotation_method=d

 

# LOG ARCHIVE PATH
# This is the directory where archived (rotated) log files should be
# placed (assuming you've chosen to do log rotation).

log_archive_path=/usr/local/nagios/var/archives

 

# LOGGING OPTIONS
# If you want messages logged to the syslog facility, as well as the
# Nagios log file set this option to 1. If not, set it to 0.

use_syslog=1

 

# NOTIFICATION LOGGING OPTION
# If you don't want notifications to be logged, set this value to 0.
# If notifications should be logged, set the value to 1.

log_notifications=1

 

# SERVICE RETRY LOGGING OPTION
# If you don't want service check retries to be logged, set this value
# to 0. If retries should be logged, set the value to 1.

log_service_retries=1

 

# HOST RETRY LOGGING OPTION
# If you don't want host check retries to be logged, set this value to
# 0. If retries should be logged, set the value to 1.

log_host_retries=1

 

# EVENT HANDLER LOGGING OPTION
# If you don't want host and service event handlers to be logged, set
# this value to 0. If event handlers should be logged, set the value
# to 1.

log_event_handlers=1

 

# INITIAL STATES LOGGING OPTION
# If you want Nagios to log all initial host and service states to
# the main log file (the first time the service or host is checked)
# you can enable this option by setting this value to 1. If you
# are not using an external application that does long term state
# statistics reporting, you do not need to enable this option. In
# this case, set the value to 0.

log_initial_states=0

 

# EXTERNAL COMMANDS LOGGING OPTION
# If you don't want Nagios to log external commands, set this value
# to 0. If external commands should be logged, set this value to 1.
# Note: This option does not include logging of passive service
# checks - see the option below for controlling whether or not
# passive checks are logged.

log_external_commands=1

 

# PASSIVE CHECKS LOGGING OPTION
# If you don't want Nagios to log passive host and service checks, set
# this value to 0. If passive checks should be logged, set
# this value to 1.

log_passive_checks=1

 

# GLOBAL HOST AND SERVICE EVENT HANDLERS
# These options allow you to specify a host and service event handler
# command that is to be run for every host or service state change.
# The global event handler is executed immediately prior to the event
# handler that you have optionally specified in each host or
# service definition. The command argument is the short name of a
# command definition that you define in your host configuration file.
# Read the HTML docs for more information.

#global_host_event_handler=somecommand
#global_service_event_handler=somecommand

 

# SERVICE INTER-CHECK DELAY METHOD
# This is the method that Nagios should use when initially
# "spreading out" service checks when it starts monitoring. The
# default is to use smart delay calculation, which will try to
# space all service checks out evenly to minimize CPU load.
# Using the dumb setting will cause all checks to be scheduled
# at the same time (with no delay between them)! This is not a
# good thing for production, but is useful when testing the
# parallelization functionality.
# n = None - don't use any delay between checks
# d = Use a "dumb" delay of 1 second between checks
# s = Use "smart" inter-check delay calculation
# x.xx = Use an inter-check delay of x.xx seconds

service_inter_check_delay_method=s

 

# MAXIMUM SERVICE CHECK SPREAD
# This variable determines the timeframe (in minutes) from the
# program start time that an initial check of all services should
# be completed. Default is 30 minutes.

max_service_check_spread=30

 

# SERVICE CHECK INTERLEAVE FACTOR
# This variable determines how service checks are interleaved.
# Interleaving the service checks allows for a more even
# distribution of service checks and reduced load on remote
# hosts. Setting this value to 1 is equivalent to how versions
# of Nagios previous to 0.0.5 did service checks. Set this
# value to s (smart) for automatic calculation of the interleave
# factor unless you have a specific reason to change it.
# s = Use "smart" interleave factor calculation
# x = Use an interleave factor of x, where x is a
# number greater than or equal to 1.

service_interleave_factor=s

 

# HOST INTER-CHECK DELAY METHOD
# This is the method that Nagios should use when initially
# "spreading out" host checks when it starts monitoring. The
# default is to use smart delay calculation, which will try to
# space all host checks out evenly to minimize CPU load.
# Using the dumb setting will cause all checks to be scheduled
# at the same time (with no delay between them)!
# n = None - don't use any delay between checks
# d = Use a "dumb" delay of 1 second between checks
# s = Use "smart" inter-check delay calculation
# x.xx = Use an inter-check delay of x.xx seconds

host_inter_check_delay_method=s

 

# MAXIMUM HOST CHECK SPREAD
# This variable determines the timeframe (in minutes) from the
# program start time that an initial check of all hosts should
# be completed. Default is 30 minutes.

max_host_check_spread=30

 

# MAXIMUM CONCURRENT SERVICE CHECKS
# This option allows you to specify the maximum number of
# service checks that can be run in parallel at any given time.
# Specifying a value of 1 for this variable essentially prevents
# any service checks from being parallelized. A value of 0
# will not restrict the number of concurrent checks that are
# being executed.

max_concurrent_checks=0

 

# HOST AND SERVICE CHECK REAPER FREQUENCY
# This is the frequency (in seconds!) that Nagios will process
# the results of host and service checks.

check_result_reaper_frequency=10

 

# MAX CHECK RESULT REAPER TIME
# This is the max amount of time (in seconds) that a single
# check result reaper event will be allowed to run before
# returning control back to Nagios so it can perform other
# duties.

max_check_result_reaper_time=30

 

# CHECK RESULT PATH
# This is directory where Nagios stores the results of host and
# service checks that have not yet been processed.
#
# Note: Make sure that only one instance of Nagios has access
# to this directory!

check_result_path=/usr/local/nagios/var/spool/checkresults

 

# MAX CHECK RESULT FILE AGE
# This option determines the maximum age (in seconds) which check
# result files are considered to be valid. Files older than this
# threshold will be mercilessly deleted without further processing.

max_check_result_file_age=3600

 

# CACHED HOST CHECK HORIZON
# This option determines the maximum amount of time (in seconds)
# that the state of a previous host check is considered current.
# Cached host states (from host checks that were performed more
# recently that the timeframe specified by this value) can immensely
# improve performance in regards to the host check logic.
# Too high of a value for this option may result in inaccurate host
# states being used by Nagios, while a lower value may result in a
# performance hit for host checks. Use a value of 0 to disable host
# check caching.

cached_host_check_horizon=15

 

# CACHED SERVICE CHECK HORIZON
# This option determines the maximum amount of time (in seconds)
# that the state of a previous service check is considered current.
# Cached service states (from service checks that were performed more
# recently that the timeframe specified by this value) can immensely
# improve performance in regards to predictive dependency checks.
# Use a value of 0 to disable service check caching.

cached_service_check_horizon=15

 

# ENABLE PREDICTIVE HOST DEPENDENCY CHECKS
# This option determines whether or not Nagios will attempt to execute
# checks of hosts when it predicts that future dependency logic test
# may be needed. These predictive checks can help ensure that your
# host dependency logic works well.
# Values:
# 0 = Disable predictive checks
# 1 = Enable predictive checks (default)

enable_predictive_host_dependency_checks=1

 

# ENABLE PREDICTIVE SERVICE DEPENDENCY CHECKS
# This option determines whether or not Nagios will attempt to execute
# checks of service when it predicts that future dependency logic test
# may be needed. These predictive checks can help ensure that your
# service dependency logic works well.
# Values:
# 0 = Disable predictive checks
# 1 = Enable predictive checks (default)

enable_predictive_service_dependency_checks=1

 

# SOFT STATE DEPENDENCIES
# This option determines whether or not Nagios will use soft state
# information when checking host and service dependencies. Normally
# Nagios will only use the latest hard host or service state when
# checking dependencies. If you want it to use the latest state (regardless
# of whether its a soft or hard state type), enable this option.
# Values:
# 0 = Don't use soft state dependencies (default)
# 1 = Use soft state dependencies

soft_state_dependencies=0

 

# TIME CHANGE ADJUSTMENT THRESHOLDS
# These options determine when Nagios will react to detected changes
# in system time (either forward or backwards).

#time_change_threshold=900

 

# AUTO-RESCHEDULING OPTION
# This option determines whether or not Nagios will attempt to
# automatically reschedule active host and service checks to
# "smooth" them out over time. This can help balance the load on
# the monitoring server.
# WARNING: THIS IS AN EXPERIMENTAL FEATURE - IT CAN DEGRADE
# PERFORMANCE, RATHER THAN INCREASE IT, IF USED IMPROPERLY

auto_reschedule_checks=0

 

# AUTO-RESCHEDULING INTERVAL
# This option determines how often (in seconds) Nagios will
# attempt to automatically reschedule checks. This option only
# has an effect if the auto_reschedule_checks option is enabled.
# Default is 30 seconds.
# WARNING: THIS IS AN EXPERIMENTAL FEATURE - IT CAN DEGRADE
# PERFORMANCE, RATHER THAN INCREASE IT, IF USED IMPROPERLY

auto_rescheduling_interval=30

 

# AUTO-RESCHEDULING WINDOW
# This option determines the "window" of time (in seconds) that
# Nagios will look at when automatically rescheduling checks.
# Only host and service checks that occur in the next X seconds
# (determined by this variable) will be rescheduled. This option
# only has an effect if the auto_reschedule_checks option is
# enabled. Default is 180 seconds (3 minutes).
# WARNING: THIS IS AN EXPERIMENTAL FEATURE - IT CAN DEGRADE
# PERFORMANCE, RATHER THAN INCREASE IT, IF USED IMPROPERLY

auto_rescheduling_window=180

 

# SLEEP TIME
# This is the number of seconds to sleep between checking for system
# events and service checks that need to be run.

sleep_time=0.25

 

# TIMEOUT VALUES
# These options control how much time Nagios will allow various
# types of commands to execute before killing them off. Options
# are available for controlling maximum time allotted for
# service checks, host checks, event handlers, notifications, the
# ocsp command, and performance data commands. All values are in
# seconds.

service_check_timeout=60
host_check_timeout=30
event_handler_timeout=30
notification_timeout=30
ocsp_timeout=5
perfdata_timeout=5

 

# RETAIN STATE INFORMATION
# This setting determines whether or not Nagios will save state
# information for services and hosts before it shuts down. Upon
# startup Nagios will reload all saved service and host state
# information before starting to monitor. This is useful for
# maintaining long-term data on state statistics, etc, but will
# slow Nagios down a bit when it (re)starts. Since its only
# a one-time penalty, I think its well worth the additional
# startup delay.

retain_state_information=1

 

# STATE RETENTION FILE
# This is the file that Nagios should use to store host and
# service state information before it shuts down. The state
# information in this file is also read immediately prior to
# starting to monitor the network when Nagios is restarted.
# This file is used only if the preserve_state_information
# variable is set to 1.

state_retention_file=/usr/local/nagios/var/retention.dat

 

# RETENTION DATA UPDATE INTERVAL
# This setting determines how often (in minutes) that Nagios
# will automatically save retention data during normal operation.
# If you set this value to 0, Nagios will not save retention
# data at regular interval, but it will still save retention
# data before shutting down or restarting. If you have disabled
# state retention, this option has no effect.

retention_update_interval=60

 

# USE RETAINED PROGRAM STATE
# This setting determines whether or not Nagios will set
# program status variables based on the values saved in the
# retention file. If you want to use retained program status
# information, set this value to 1. If not, set this value
# to 0.

use_retained_program_state=1

 

# USE RETAINED SCHEDULING INFO
# This setting determines whether or not Nagios will retain
# the scheduling info (next check time) for hosts and services
# based on the values saved in the retention file. If you
# If you want to use retained scheduling info, set this
# value to 1. If not, set this value to 0.

use_retained_scheduling_info=1

 

# RETAINED ATTRIBUTE MASKS (ADVANCED FEATURE)
# The following variables are used to specify specific host and
# service attributes that should *not* be retained by Nagios during
# program restarts.
#
# The values of the masks are bitwise ANDs of values specified
# by the "MODATTR_" definitions found in include/common.h.
# For example, if you do not want the current enabled/disabled state
# of flap detection and event handlers for hosts to be retained, you
# would use a value of 24 for the host attribute mask...
# MODATTR_EVENT_HANDLER_ENABLED (8) + MODATTR_FLAP_DETECTION_ENABLED (16) = 24

# This mask determines what host attributes are not retained
retained_host_attribute_mask=0

# This mask determines what service attributes are not retained
retained_service_attribute_mask=0

# These two masks determine what process attributes are not retained.
# There are two masks, because some process attributes have host and service
# options. For example, you can disable active host checks, but leave active
# service checks enabled.
retained_process_host_attribute_mask=0
retained_process_service_attribute_mask=0

# These two masks determine what contact attributes are not retained.
# There are two masks, because some contact attributes have host and
# service options. For example, you can disable host notifications for
# a contact, but leave service notifications enabled for them.
retained_contact_host_attribute_mask=0
retained_contact_service_attribute_mask=0

 

# INTERVAL LENGTH
# This is the seconds per unit interval as used in the
# host/contact/service configuration files. Setting this to 60 means
# that each interval is one minute long (60 seconds). Other settings
# have not been tested much, so your mileage is likely to vary...

interval_length=60

 

# AGGRESSIVE HOST CHECKING OPTION
# If you don't want to turn on aggressive host checking features, set
# this value to 0 (the default). Otherwise set this value to 1 to
# enable the aggressive check option. Read the docs for more info
# on what aggressive host check is or check out the source code in
# base/checks.c

use_aggressive_host_checking=0

 

# SERVICE CHECK EXECUTION OPTION
# This determines whether or not Nagios will actively execute
# service checks when it initially starts. If this option is
# disabled, checks are not actively made, but Nagios can still
# receive and process passive check results that come in. Unless
# you're implementing redundant hosts or have a special need for
# disabling the execution of service checks, leave this enabled!
# Values: 1 = enable checks, 0 = disable checks

execute_service_checks=1

 

# PASSIVE SERVICE CHECK ACCEPTANCE OPTION
# This determines whether or not Nagios will accept passive
# service checks results when it initially (re)starts.
# Values: 1 = accept passive checks, 0 = reject passive checks

accept_passive_service_checks=1

 

# HOST CHECK EXECUTION OPTION
# This determines whether or not Nagios will actively execute
# host checks when it initially starts. If this option is
# disabled, checks are not actively made, but Nagios can still
# receive and process passive check results that come in. Unless
# you're implementing redundant hosts or have a special need for
# disabling the execution of host checks, leave this enabled!
# Values: 1 = enable checks, 0 = disable checks

execute_host_checks=1

 

# PASSIVE HOST CHECK ACCEPTANCE OPTION
# This determines whether or not Nagios will accept passive
# host checks results when it initially (re)starts.
# Values: 1 = accept passive checks, 0 = reject passive checks

accept_passive_host_checks=1

 

# NOTIFICATIONS OPTION
# This determines whether or not Nagios will sent out any host or
# service notifications when it is initially (re)started.
# Values: 1 = enable notifications, 0 = disable notifications

enable_notifications=1

 

# EVENT HANDLER USE OPTION
# This determines whether or not Nagios will run any host or
# service event handlers when it is initially (re)started. Unless
# you're implementing redundant hosts, leave this option enabled.
# Values: 1 = enable event handlers, 0 = disable event handlers

enable_event_handlers=1

 

# PROCESS PERFORMANCE DATA OPTION
# This determines whether or not Nagios will process performance
# data returned from service and host checks. If this option is
# enabled, host performance data will be processed using the
# host_perfdata_command (defined below) and service performance
# data will be processed using the service_perfdata_command (also
# defined below). Read the HTML docs for more information on
# performance data.
# Values: 1 = process performance data, 0 = do not process performance data

process_performance_data=0

 

# HOST AND SERVICE PERFORMANCE DATA PROCESSING COMMANDS
# These commands are run after every host and service check is
# performed. These commands are executed only if the
# enable_performance_data option (above) is set to 1. The command
# argument is the short name of a command definition that you
# define in your host configuration file. Read the HTML docs for
# more information on performance data.

#host_perfdata_command=process-host-perfdata
#service_perfdata_command=process-service-perfdata

 

# HOST AND SERVICE PERFORMANCE DATA FILES
# These files are used to store host and service performance data.
# Performance data is only written to these files if the
# enable_performance_data option (above) is set to 1.

#host_perfdata_file=/tmp/host-perfdata
#service_perfdata_file=/tmp/service-perfdata

 

# HOST AND SERVICE PERFORMANCE DATA FILE TEMPLATES
# These options determine what data is written (and how) to the
# performance data files. The templates may contain macros, special
# characters (\t for tab, \r for carriage return, \n for newline)
# and plain text. A newline is automatically added after each write
# to the performance data file. Some examples of what you can do are
# shown below.

#host_perfdata_file_template=[HOSTPERFDATA]\t$TIMET$\t$HOSTNAME$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$
#service_perfdata_file_template=[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$

 

# HOST AND SERVICE PERFORMANCE DATA FILE MODES
# This option determines whether or not the host and service
# performance data files are opened in write ("w") or append ("a")
# mode. If you want to use named pipes, you should use the special
# pipe ("p") mode which avoid blocking at startup, otherwise you will
# likely want the defult append ("a") mode.

#host_perfdata_file_mode=a
#service_perfdata_file_mode=a

 

# HOST AND SERVICE PERFORMANCE DATA FILE PROCESSING INTERVAL
# These options determine how often (in seconds) the host and service
# performance data files are processed using the commands defined
# below. A value of 0 indicates the files should not be periodically
# processed.

#host_perfdata_file_processing_interval=0
#service_perfdata_file_processing_interval=0

 

# HOST AND SERVICE PERFORMANCE DATA FILE PROCESSING COMMANDS
# These commands are used to periodically process the host and
# service performance data files. The interval at which the
# processing occurs is determined by the options above.

#host_perfdata_file_processing_command=process-host-perfdata-file
#service_perfdata_file_processing_command=process-service-perfdata-file

 

# OBSESS OVER SERVICE CHECKS OPTION
# This determines whether or not Nagios will obsess over service
# checks and run the ocsp_command defined below. Unless you're
# planning on implementing distributed monitoring, do not enable
# this option. Read the HTML docs for more information on
# implementing distributed monitoring.
# Values: 1 = obsess over services, 0 = do not obsess (default)

obsess_over_services=0

 

# OBSESSIVE COMPULSIVE SERVICE PROCESSOR COMMAND
# This is the command that is run for every service check that is
# processed by Nagios. This command is executed only if the
# obsess_over_services option (above) is set to 1. The command
# argument is the short name of a command definition that you
# define in your host configuration file. Read the HTML docs for
# more information on implementing distributed monitoring.

#ocsp_command=somecommand

 

# OBSESS OVER HOST CHECKS OPTION
# This determines whether or not Nagios will obsess over host
# checks and run the ochp_command defined below. Unless you're
# planning on implementing distributed monitoring, do not enable
# this option. Read the HTML docs for more information on
# implementing distributed monitoring.
# Values: 1 = obsess over hosts, 0 = do not obsess (default)

obsess_over_hosts=0

 

# OBSESSIVE COMPULSIVE HOST PROCESSOR COMMAND
# This is the command that is run for every host check that is
# processed by Nagios. This command is executed only if the
# obsess_over_hosts option (above) is set to 1. The command
# argument is the short name of a command definition that you
# define in your host configuration file. Read the HTML docs for
# more information on implementing distributed monitoring.

#ochp_command=somecommand

 

# TRANSLATE PASSIVE HOST CHECKS OPTION
# This determines whether or not Nagios will translate
# DOWN/UNREACHABLE passive host check results into their proper
# state for this instance of Nagios. This option is useful
# if you have distributed or failover monitoring setup. In
# these cases your other Nagios servers probably have a different
# "view" of the network, with regards to the parent/child relationship
# of hosts. If a distributed monitoring server thinks a host
# is DOWN, it may actually be UNREACHABLE from the point of
# this Nagios instance. Enabling this option will tell Nagios
# to translate any DOWN or UNREACHABLE host states it receives
# passively into the correct state from the view of this server.
# Values: 1 = perform translation, 0 = do not translate (default)

translate_passive_host_checks=0

 

# PASSIVE HOST CHECKS ARE SOFT OPTION
# This determines whether or not Nagios will treat passive host
# checks as being HARD or SOFT. By default, a passive host check
# result will put a host into a HARD state type. This can be changed
# by enabling this option.
# Values: 0 = passive checks are HARD, 1 = passive checks are SOFT

passive_host_checks_are_soft=0

 

# ORPHANED HOST/SERVICE CHECK OPTIONS
# These options determine whether or not Nagios will periodically
# check for orphaned host service checks. Since service checks are
# not rescheduled until the results of their previous execution
# instance are processed, there exists a possibility that some
# checks may never get rescheduled. A similar situation exists for
# host checks, although the exact scheduling details differ a bit
# from service checks. Orphaned checks seem to be a rare
# problem and should not happen under normal circumstances.
# If you have problems with service checks never getting
# rescheduled, make sure you have orphaned service checks enabled.
# Values: 1 = enable checks, 0 = disable checks

check_for_orphaned_services=1
check_for_orphaned_hosts=1

 

# SERVICE FRESHNESS CHECK OPTION
# This option determines whether or not Nagios will periodically
# check the "freshness" of service results. Enabling this option
# is useful for ensuring passive checks are received in a timely
# manner.
# Values: 1 = enabled freshness checking, 0 = disable freshness checking

check_service_freshness=1

 

# SERVICE FRESHNESS CHECK INTERVAL
# This setting determines how often (in seconds) Nagios will
# check the "freshness" of service check results. If you have
# disabled service freshness checking, this option has no effect.

service_freshness_check_interval=60

 

# HOST FRESHNESS CHECK OPTION
# This option determines whether or not Nagios will periodically
# check the "freshness" of host results. Enabling this option
# is useful for ensuring passive checks are received in a timely
# manner.
# Values: 1 = enabled freshness checking, 0 = disable freshness checking

check_host_freshness=0

 

# HOST FRESHNESS CHECK INTERVAL
# This setting determines how often (in seconds) Nagios will
# check the "freshness" of host check results. If you have
# disabled host freshness checking, this option has no effect.

host_freshness_check_interval=60

 

# ADDITIONAL FRESHNESS THRESHOLD LATENCY
# This setting determines the number of seconds that Nagios
# will add to any host and service freshness thresholds that
# it calculates (those not explicitly specified by the user).

additional_freshness_latency=15

 

# FLAP DETECTION OPTION
# This option determines whether or not Nagios will try
# and detect hosts and services that are "flapping".
# Flapping occurs when a host or service changes between
# states too frequently. When Nagios detects that a
# host or service is flapping, it will temporarily suppress
# notifications for that host/service until it stops
# flapping. Flap detection is very experimental, so read
# the HTML documentation before enabling this feature!
# Values: 1 = enable flap detection
# 0 = disable flap detection (default)

enable_flap_detection=1

 

# FLAP DETECTION THRESHOLDS FOR HOSTS AND SERVICES
# Read the HTML documentation on flap detection for
# an explanation of what this option does. This option
# has no effect if flap detection is disabled.

low_service_flap_threshold=5.0
high_service_flap_threshold=20.0
low_host_flap_threshold=5.0
high_host_flap_threshold=20.0

 

# DATE FORMAT OPTION
# This option determines how short dates are displayed. Valid options
# include:
# us (MM-DD-YYYY HH:MM:SS)
# euro (DD-MM-YYYY HH:MM:SS)
# iso8601 (YYYY-MM-DD HH:MM:SS)
# strict-iso8601 (YYYY-MM-DDTHH:MM:SS)
#

date_format=us

 

# TIMEZONE OFFSET
# This option is used to override the default timezone that this
# instance of Nagios runs in. If not specified, Nagios will use
# the system configured timezone.
#
# NOTE: In order to display the correct timezone in the CGIs, you
# will also need to alter the Apache directives for the CGI path
# to include your timezone. Example:
#
# <Directory "/usr/local/nagios/sbin/">
# SetEnv TZ "Australia/Brisbane"
# ...
# </Directory>

#use_timezone=US/Mountain
#use_timezone=Australia/Brisbane

 

# P1.PL FILE LOCATION
# This value determines where the p1.pl perl script (used by the
# embedded Perl interpreter) is located. If you didn't compile
# Nagios with embedded Perl support, this option has no effect.

p1_file=/usr/local/nagios/bin/p1.pl

 

# EMBEDDED PERL INTERPRETER OPTION
# This option determines whether or not the embedded Perl interpreter
# will be enabled during runtime. This option has no effect if Nagios
# has not been compiled with support for embedded Perl.
# Values: 0 = disable interpreter, 1 = enable interpreter

enable_embedded_perl=1

 

# EMBEDDED PERL USAGE OPTION
# This option determines whether or not Nagios will process Perl plugins
# and scripts with the embedded Perl interpreter if the plugins/scripts
# do not explicitly indicate whether or not it is okay to do so. Read
# the HTML documentation on the embedded Perl interpreter for more
# information on how this option works.

use_embedded_perl_implicitly=1

 

# ILLEGAL OBJECT NAME CHARACTERS
# This option allows you to specify illegal characters that cannot
# be used in host names, service descriptions, or names of other
# object types.

illegal_object_name_chars=`~!$%^&*|'"<>?,()=

 

# ILLEGAL MACRO OUTPUT CHARACTERS
# This option allows you to specify illegal characters that are
# stripped from macros before being used in notifications, event
# handlers, etc. This DOES NOT affect macros used in service or
# host check commands.
# The following macros are stripped of the characters you specify:
# $HOSTOUTPUT$
# $HOSTPERFDATA$
# $HOSTACKAUTHOR$
# $HOSTACKCOMMENT$
# $SERVICEOUTPUT$
# $SERVICEPERFDATA$
# $SERVICEACKAUTHOR$
# $SERVICEACKCOMMENT$

illegal_macro_output_chars=`~$&|'"<>

 

# REGULAR EXPRESSION MATCHING
# This option controls whether or not regular expression matching
# takes place in the object config files. Regular expression
# matching is used to match host, hostgroup, service, and service
# group names/descriptions in some fields of various object types.
# Values: 1 = enable regexp matching, 0 = disable regexp matching

use_regexp_matching=0

 

# "TRUE" REGULAR EXPRESSION MATCHING
# This option controls whether or not "true" regular expression
# matching takes place in the object config files. This option
# only has an effect if regular expression matching is enabled
# (see above). If this option is DISABLED, regular expression
# matching only occurs if a string contains wildcard characters
# (* and ?). If the option is ENABLED, regexp matching occurs
# all the time (which can be annoying).
# Values: 1 = enable true matching, 0 = disable true matching

use_true_regexp_matching=0

 

# ADMINISTRATOR EMAIL/PAGER ADDRESSES
# The email and pager address of a global administrator (likely you).
# Nagios never uses these values itself, but you can access them by
# using the $ADMINEMAIL$ and $ADMINPAGER$ macros in your notification
# commands.

admin_email=nagios@localhost
admin_pager=pagenagios@localhost

 

# DAEMON CORE DUMP OPTION
# This option determines whether or not Nagios is allowed to create
# a core dump when it runs as a daemon. Note that it is generally
# considered bad form to allow this, but it may be useful for
# debugging purposes. Enabling this option doesn't guarantee that
# a core file will be produced, but that's just life...
# Values: 1 - Allow core dumps
# 0 - Do not allow core dumps (default)

daemon_dumps_core=0

 

# LARGE INSTALLATION TWEAKS OPTION
# This option determines whether or not Nagios will take some shortcuts
# which can save on memory and CPU usage in large Nagios installations.
# Read the documentation for more information on the benefits/tradeoffs
# of enabling this option.
# Values: 1 - Enabled tweaks
# 0 - Disable tweaks (default)

use_large_installation_tweaks=0

 

# ENABLE ENVIRONMENT MACROS
# This option determines whether or not Nagios will make all standard
# macros available as environment variables when host/service checks
# and system commands (event handlers, notifications, etc.) are
# executed. Enabling this option can cause performance issues in
# large installations, as it will consume a bit more memory and (more
# importantly) consume more CPU.
# Values: 1 - Enable environment variable macros (default)
# 0 - Disable environment variable macros

enable_environment_macros=1

 

# CHILD PROCESS MEMORY OPTION
# This option determines whether or not Nagios will free memory in
# child processes (processed used to execute system commands and host/
# service checks). If you specify a value here, it will override
# program defaults.
# Value: 1 - Free memory in child processes
# 0 - Do not free memory in child processes

#free_child_process_memory=1

 

# CHILD PROCESS FORKING BEHAVIOR
# This option determines how Nagios will fork child processes
# (used to execute system commands and host/service checks). Normally
# child processes are fork()ed twice, which provides a very high level
# of isolation from problems. Fork()ing once is probably enough and will
# save a great deal on CPU usage (in large installs), so you might
# want to consider using this. If you specify a value here, it will
# program defaults.
# Value: 1 - Child processes fork() twice
# 0 - Child processes fork() just once

#child_processes_fork_twice=1

 

# DEBUG LEVEL
# This option determines how much (if any) debugging information will
# be written to the debug file. OR values together to log multiple
# types of information.
# Values:
# -1 = Everything
# 0 = Nothing
# 1 = Functions
# 2 = Configuration
# 4 = Process information
# 8 = Scheduled events
# 16 = Host/service checks
# 32 = Notifications
# 64 = Event broker
# 128 = External commands
# 256 = Commands
# 512 = Scheduled downtime
# 1024 = Comments
# 2048 = Macros

debug_level=0

 

# DEBUG VERBOSITY
# This option determines how verbose the debug log out will be.
# Values: 0 = Brief output
# 1 = More detailed
# 2 = Very detailed

debug_verbosity=1

 

# DEBUG FILE
# This option determines where Nagios should write debugging information.

debug_file=/usr/local/nagios/var/nagios.debug

 

# MAX DEBUG FILE SIZE
# This option determines the maximum size (in bytes) of the debug file. If
# the file grows larger than this size, it will be renamed with a .old
# extension. If a file already exists with a .old extension it will
# automatically be deleted. This helps ensure your disk space usage doesn't
# get out of control when debugging Nagios.

max_debug_file_size=1000000

 

 

Artículos relacionados

Créditos

Artículo realizado íntegramente por Alonsojpd miembro fundador del proyecto AjpdSoft.



Nota:
Revisado por AjpdSoft el 06-07-2009.
Revisado por AjpdSoft el 05-07-2009.

Anuncios


Enviado el Lunes, 01 septiembre a las 01:04:21 por ajpdsoft
Este sitio web NO CONTIENE malware, todos los programas con código fuente aquí. Autor: Alonso Javier Pérez Díaz Google+ Síguenos en Google+