123sww 发表于 2014-12-11 08:37:23

nagios监控多个磁盘空间

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
define service {
                service_description                   check_disk3
                max_check_attempts                  3
                check_interval                        1
                retry_interval                        3
                notification_interval               0
                notification_options                  w,u,c,r,f,s
                notifications_enabled               1
                check_command                         check_nrpe!check_disk3
                check_period                        24x7
                notification_period                   24x7
                host_name                           AFA_EBS_DB
}
define service {
                service_description                   check_disk4
                max_check_attempts                  3
                check_interval                        1
                retry_interval                        3
                notification_interval               0
                notification_options                  w,u,c,r,f,s
                notifications_enabled               1
                check_command                         check_nrpe!check_disk4
                check_period                        24x7
                notification_period                   24x7
                host_name                           AFA_EBS_DB




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

1
2
3
4
command=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/emcpowera1
command=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/emcpowerb1
command=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sdb1
command=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/emcpowerc1




分别重启监控端和被监控段的服务即可
效果如下:



页: [1]
查看完整版本: nagios监控多个磁盘空间