大家好,欢迎来到IT知识分享网。
监控存储(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
使用:
aggr:
# /usr/lib64/nagios/plugins/check-netapp-ng.pl–H 10.0.0.3 –C public –T DISKUSED –v aggr0 –w 90 –c 95
卷:
# /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
IO:
# /usr/lib64/nagios/plugins/check-netapp-ng.pl–H 10.0.0.3 -C public -T FCPOPS
显示报警硬盘:
# /usr/lib64/nagios/plugins/check-netapp-ng.pl–H 10.0.0.3 –C public –T FAILEDDISK
显示所有硬盘情况:
# /usr/lib64/nagios/plugins/check-netapp-ng.pl–H 10.0.0.3 –C public –T DISKSUMMARY
修改check-netapp-ng.pl让其显示aggr、vol的总大小、剩余大小等
# cp check-netapp-ng.pl check-netapp-ng2.pl
# vi check-netapp-ng2.pl (默认为16、17,为已用大小,18、19为剩余大小,14、15为总大小)
my $snmp_netapp_volume_id_table_df_used_high = “$snmp_netapp_volume_id_table_df.18”;
my $snmp_netapp_volume_id_table_df_used_low = “$snmp_netapp_volume_id_table_df.19”;
:wq
用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 = “24×7”
vars.notification[“mail”] = {
groups = [ “icingaadmins” ]
}
}
:wq
# chownicinga:icinga /etc/icinga2/conf.d/netapp.conf
# service icinga2 restart
转载于:https://blog.51cto.com/yangzhiming/1876586
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/16308.html