通过check_ilo2_health.pl插件监控HP服务器健康状态:
下载地址:
使用示例:
/usr/lib64/nagios/plugins/check_ilo2_health.pl --ilo3 -u aa -p‘xxxxxx‘ -H 10.0.0.3
注:
1、密码带特殊符号需要用单引号
2、ilo3以上都要加--ilo3
3、开防火墙只需开443端口即可
vi /etc/icinga2/conf.d/templates.conf
object CheckCommand "HPilo" {
import "plugin-check-command"
command = [ PluginDir + "/check_ilo2_health.pl --ilo3" ]
arguments = {
"-H" = "$address$"
"-u" = "$user$"
"-p" = "$pass$"
"-t" = "$t$"
}
}
:wq
vi /etc/icinga2/conf.d/services.conf
apply Service "HPilo" {
import "generic-service"
check_command = "HPilo"
vars.user="aa"
vars.pass="xxxxxx"
vars.t="30"
assign where host.address == "10.0.0.3"
}
:wq
service icinga2 restart
原文地址:http://blog.51cto.com/yangzhiming/2342722
时间: 2024-10-06 11:06:42