199
9.3 Advanced Distributed Monitoring Configuration
9.3.1 Sample Nagios configuration
An example configuration for Nagios is listed below. It shows how to set up a remote Console server to
monitor a single host, with both network and serial connections. For each check it has two configurations,
one each for NRPE and NSCA. In practice, these would be combined into a single check which used NSCA
as a primary method, falling back to NRPE if a check was late – for details see the Nagios documentation
http://www.nagios.org/documentation/ on Service and Host Freshness Checks
; Host definitions
;
; Opengear Console server
define host{
use generic-host
host_name opengear
alias Console server
address 192.168.254.147
}
; Managed Host
define host{
use generic-host
host_name server
alias server
address 192.168.254.227
}
; NRPE daemon on gateway
define command {
command_name check_nrpe_daemon
command_line $USER1$/check_nrpe -H 192.168.254.147 -p 5666
}
define service {
service_description NRPE Daemon
host_name opengear
use generic-service
check_command check_nrpe_daemon
}
; Serial Status
define command {
command_name check_serial_status
command_line $USER1$/check_nrpe -H 192.168.254.147 -p 5666 -c
check_serial_$HOSTNAME$
}
define service {
service_description Serial Status
host_name server
use generic-service
check_command check_serial_status
}
define service {
service_description serial-signals-server
host_name server