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

icinga2监控Netapp存储

时间:2016-11-26 00:22:10      阅读:343      评论:0      收藏:0      [点我收藏+]

标签:check-netapp-ng.pl

监控存储(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存储

标签:check-netapp-ng.pl

原文地址:http://yangzhiming.blog.51cto.com/4849999/1876586

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