icinga2通过check_hpasm监控HP服务器硬件报警
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了icinga2通过check_hpasm监控HP服务器硬件报警相关的知识,希望对你有一定的参考价值。
icinga2通过check_hpasm监控HP服务器硬件报警:
https://labs.consol.de/nagios/check_hpasm/#download
被监控服务器需安装hp-snmp-agents
# dpkg -i hp-snmp-agents_10.40-2909.34_amd64.deb
# /sbin/hpsnmpconfig
输入y (即使用已有/etc/snmp/snmpd.conf配置)
# tar zxfv check_hpasm-4.7.5.4.tar.gz
# cd check_hpasm-4.7.5.4
# ./configure
# make
# make install
# cp -rv /usr/local/nagios/libexec/check_hpasm /usr/lib64/nagios/plugins/
# /usr/lib64/nagios/plugins/check_hpasm -H 10.0.0.3 -C public --perfdata=short
配置icinga2
# vi /etc/icinga2/conf.d/templates.conf
object CheckCommand "HP" {
import "plugin-check-command"
command = [ PluginDir + "/check_hpasm" ]
arguments = {
"-H" = "$address$"
"-C" = "$snmp$"
"--perfdata" = "$perf$"
}
}
:wq
# vi /etc/icinga2/conf.d/services.conf
apply Service "HP" {
import "generic-service"
check_command = "HP"
vars.snmp="SPD.ubuntusrv#989"
vars.perf="--perfdata=short"
assign where host.address == "10.29.1.52" || host.address == "10.29.1.53"
}
:wq
# service icinga2 restart
本文出自 “linux” 博客,请务必保留此出处http://yangzhiming.blog.51cto.com/4849999/1943582
以上是关于icinga2通过check_hpasm监控HP服务器硬件报警的主要内容,如果未能解决你的问题,请参考以下文章
icinga2通过check_ping.pl插件生成可用性监控
icinga2使用check_snmp_idrac.py监控DELL硬件状态