Nagios クライアントインストール2

ちょっともう一度おさらいとして(汗



(1)監視サーバ側


[root@L2 nagios]# vi commands.cfg

# check nrpe
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}

[root@L2 nagios]# cat ./servers/L1.cfg

define service{
use local-service
normal_check_interval 10
notification_interval 30
host_name L1
service_description nrpe - procs
check_command check_nrpe!check_total_procs
}

define service{
use local-service
normal_check_interval 10
notification_interval 30
host_name L1
service_description nrpe - load
check_command check_nrpe!check_load
}

define service{
use local-service
normal_check_interval 10
notification_interval 30
host_name L1
service_description nrpe - disk
check_command check_nrpe!check_disk
}

(2)監視ノード側


[root@L1 nagios]# vi nrpe.cfg

# The following examples use hardcoded command arguments...

command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
##command[check_hda]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda2
command[check_disk]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10%
command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200