标签:iowait
通过icinga2监控服务器的top(CPU)信息,主要为cpu iowait值
插件下载网址(复制内容改名为check_iostat_cpu,以便和另1个监控硬盘IO的check_iostat区分):
http://www.ofn.dk/files/software/check_iostat
使用(不用加任何参数):
# /usr/lib64/nagios/plugins/check_iostat_cpu
需要安装Regexp::Common模块
# cpan Regexp::Common
修改nrpe.cfg文件:
# vi /etc/nagios/nrpe.cfg
command[check_iostat_cpu]=/usr/lib/nagios/plugins/check_iostat_cpu
:wq
# service nagios-nrpe-server restart (redhat为nrpe)
修改icinga2配置:
# vi /etc/icinga2/conf.d/templates.conf
object CheckCommand "iostat-cpu" {
import "plugin-check-command"
command = [ PluginDir + "/check_iostat_cpu" ]
}
:wq
# vi /etc/icinga2/conf.d/services.conf
apply Service "iostat-cpu" {
import "generic-service"
check_command = "iostat-cpu"
assign where host.address == "10.0.0.2"
}
:wq
# service icinga2 restart
本文出自 “linux” 博客,请务必保留此出处http://yangzhiming.blog.51cto.com/4849999/1965061
标签:iowait
原文地址:http://yangzhiming.blog.51cto.com/4849999/1965061