Nagios, configuración básica para http
1.- Cambiar dirección de e-mail para notificaciones, en /etc/nagios3/conf.d/contacts_nagios2.cfg
2.- Se añade en /etc/nagios3/nagios.conf, lo siguiente
cfg_file=/etc/nagios3/hosts.cfg
cfg_file=/etc/nagios3/services.cfg
3.- Creamos hosts.cfg y services.cvg
4.- en hosts.cfg ponemos:
define host{
use generic-host ; Inherit default values from a template
host_name web ; The name we’re giving to this host
alias el portal ; A longer name associated with the host
address 192.168.70.13 ; IP address of the host
}
5.- en commands.cfg
define command{
name check_web
command_name check_web
command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
}define command{
name check_document
command_name check_document
command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
}
7.- y en services.cfg:
define service{
use generic-service ; Inherit default values from a template
host_name web
service_description comprobar pagina principal web
check_command check_http
}define service{
use generic-service ; Inherit default values from a template
host_name web
service_description comprobar un documento cualquiera ;solicitud general
check_command check_document! -u “/c/document_library/get_file?uuid=e7c80ca5-3e9e-4f3f-96a9-aed52ecda648&groupId=16302″
}