Chapter 10: Nagios Integration

host_name

Black Box

alias

Console server

address

192.168.254.147

}

 

;Managed Host define host{

usegeneric-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

Black Box

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

 

use

 

generic-service

check_command

 

check_serial_status

active_checks_enabled

0

 

passive_checks_enabled

1

 

}

 

 

 

define servicedependency{

 

 

 

name

 

 

Black Box_nrpe_daemon_dep

host_name

 

 

Black Box

dependent_host_name

 

server

dependent_service_description

Serial Status

service_description

NRPE Daemon

execution_failure_criteria

w,u,c

 

}

 

 

 

; Port Log

 

 

 

define command{

 

 

 

command_name check_port_log

 

command_line

$USER1$/check_nrpe -H 192.168.254.147 -p 5666 -c port_log_$HOSTNAME$

}

 

 

 

define service {

 

 

 

service_description Port Log

 

 

host_name

 

server

 

use

 

generic-service

724-746-5500 blackbox.com

101

Page 101
Image 101
Black Box 1101 Hostname Black Box Alias, Address 192.168.254.147, Commandname checknrpedaemon Commandline, Define service