1. 程式人生 > >通過check_ilo2_health.pl插件監控HP服務器健康狀態

通過check_ilo2_health.pl插件監控HP服務器健康狀態

man -c exchange bject har onf emp directory 防火墻

通過check_ilo2_health.pl插件監控HP服務器健康狀態:

下載地址:

https://exchange.nagios.org/directory/Plugins/Hardware/Server-Hardware/HP-(Compaq)/check_ilo2_health/details

使用示例:

/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

通過check_ilo2_health.pl插件監控HP服務器健康狀態