ngios默认监控第一个磁盘分区,需要在service中定义多个监控项,如:

defineservice{service_descriptioncheck_disk3max_check_attempts3check_interval1retry_interval3notification_interval0notification_optionsw,u,c,r,f,snotifications_enabled1check_commandcheck_nrpe!check_disk3check_period24x7notification_period24x7host_nameAFA_EBS_DB}defineservice{service_descriptioncheck_disk4max_check_attempts3check_interval1retry_interval3notification_interval0notification_optionsw,u,c,r,f,snotifications_enabled1check_commandcheck_nrpe!check_disk4check_period24x7notification_period24x7host_nameAFA_EBS_DB

然后再监控机上配置这些项即可,如:

command[check_disk3]=/usr/local/nagios/libexec/check_disk-w20%-c10%-p/dev/emcpowera1command[check_disk4]=/usr/local/nagios/libexec/check_disk-w20%-c10%-p/dev/emcpowerb1command[check_disk5]=/usr/local/nagios/libexec/check_disk-w20%-c10%-p/dev/sdb1command[check_disk6]=/usr/local/nagios/libexec/check_disk-w20%-c10%-p/dev/emcpowerc1

分别重启监控端和被监控段的服务即可

效果如下: