码迷,mamicode.com
首页 > 移动开发 > 详细

nagios监控多个磁盘空间

时间:2014-12-10 14:35:43      阅读:223      评论:0      收藏:0      [点我收藏+]

标签:nagios 监控 多个磁盘空间

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

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

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

command[check_disk3]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/emcpowera1
command[check_disk4]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/emcpowerb1
command[check_disk5]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sdb1
command[check_disk6]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/emcpowerc1

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

效果如下:

bubuko.com,布布扣

本文出自 “IT民工--小枫” 博客,请务必保留此出处http://wangfeng7399.blog.51cto.com/3518031/1588170

nagios监控多个磁盘空间

标签:nagios 监控 多个磁盘空间

原文地址:http://wangfeng7399.blog.51cto.com/3518031/1588170

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!