首页 > 代码库 > icinga2监控Netapp存储
icinga2监控Netapp存储
监控存储(check-netapp-ng.pl):
下载网址:https://github.com/ranl/monitor-utils/blob/master/nagios/check-netapp-ng.pl
# mv check-netapp-ng.pl/usr/lib64/nagios/plugins/
# chmod +x /usr/lib64/nagios/plugins/check-netapp-ng.pl
使用:
卷:
# /usr/lib64/nagios/plugins/check-netapp-ng.pl–H 10.0.0.3 –C public –T DISKUSED –vol /vol/Backup –w 90 –c 95
整体状态:
# /usr/lib64/nagios/plugins/check-netapp-ng.pl–H 10.0.0.3 –C public –T GLOBALSTATUS
CPU:
# /usr/lib64/nagios/plugins/check-netapp-ng.pl–H 10.0.0.3 -C public -T CPULOAD –w 90 –c 95
用icinga2监控存储整体状态(单个卷超过98%会报警的,卷及CPU调整vars.checktype值即可):
# vi/etc/icinga2/conf.d/templates.conf
objectCheckCommand "check-netapp" {
import "plugin-check-command"
command = [ PluginDir +"/check-netapp-ng.pl" ]
arguments = {
"-H" = "$address$"
"-C" = "$snmp$"
"-T" = "$checktype$"
"-w" = "$warn$"
"-c" = "$crit$"
}
}
:wq
# vi/etc/icinga2/conf.d/services.conf
applyService "check_netapp" {
import "generic-service"
check_command = "check-netapp"
vars.snmp="public"
vars.checktype="GLOBALSTATUS"
vars.vol="/vol/Backup/"
assign where host.vars.os =="netapp"
}
:wq
# vi/etc/icinga2/conf.d/netapp.conf
objectHost "shnas7" {
import "generic-host"
address = "10.0.1.21"
vars.os = "netapp"
vars.sla = "24x7"
vars.notification["mail"] = {
groups = [ "icingaadmins" ]
}
}
:wq
# chownicinga:icinga /etc/icinga2/conf.d/netapp.conf
# service icinga2 restart
本文出自 “linux” 博客,请务必保留此出处http://yangzhiming.blog.51cto.com/4849999/1876586
icinga2监控Netapp存储