ICINGA2 Crawl Linux Server Diskio with check_iostat.sh (hard drive busy)
: Https://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/Check-Iostat-Updated/details
Modify the script (default = $12,12 is the w_await value, 14 is the%util value)
Util= ' Cat $TMP | $AWK ' {sum + = $14} END {print Sum/nr} '
Monitored side:
Copy the modified script to the Nrpe end of the/usr/lib/nagios/plugins/
# vi/etc/nagios/nrpe.cfg (IS-u parameter, without/dev/)
Command[check_diskio]=/usr/lib/nagios/plugins/check_iostat-w 180-c 190-u SDB1
: Wq
Monitoring side:
# vi/etc/icinga2/conf.d/templates.conf
Object Checkcommand "Nrpe-diskio" {
Import "Nrpe-common"
Vars.nrpe_command = "Check_diskio"
}
: Wq
# vi/etc/icinga2/conf.d/services.conf (Shhudson for pre-defined OS, on behalf of host group)
Apply Service "Nrpe-diskio" {
Import "Generic-service"
Check_command = "Nrpe-diskio"
assign where Host.vars.os = = "Shhudson"
}
: Wq
# Service ICINGA2 Restart
This article is from the "Linux" blog, so be sure to keep this source http://yangzhiming.blog.51cto.com/4849999/1884208
ICINGA2 Crawl Linux Server Diskio with check_iostat.sh (hard drive busy)