I’ve installed on my test-environment the Plugin “check_ilo2_health” and I’ve defined the following Host- and Service-Template, Service-Check, CheckCommand, Host-Definitions and Apply-Rule:
Apply-Rule:
apply Service "ilo" to Host {
check_command = "check_ilo2_health"
display_name = "iLo"
vars.ilo_address = host.vars.ilo.ip
vars.ilo_user = host.vars.ilo.username
vars.ilo_pwd = host.vars.ilo.password
assign where match("ilo*", host.name)
assign where host.name == "ilo-ilo-192.168.120.15"
}
When I do an “service icinga2 checkconfig” the syntax is fine and when I do an “service icinga2 restart” and have a look in icingaweb the Service is in the State “unknown” and the plugin-output says:
" <Timeout exceeded.><Terminated by signal 9 (Killed).>"
Does someone of you have an idea why I’ve this problem?
The plugin takes too long to execute, and in order to avoid zombie processes, Icinga kills the execution.
Extract the command line for this service as explained in the troubleshooting docs, and test it as Icinga user. Likely it is either a firewall problem, or the ilo responds too slow.
Can you give me the link for the troubleshooting docs so that I can understand the mistake?
And how can I test it as Icinga user?
I had a look in the Icinga Monitoring Basic Docs and there they wrote that it’s that it is necessary to have an object service but I only have an “apply Service”… Whats the different between these two?
In your code for the check command definition you have the following line:
There you use the --ilo3 switch. When looking at your Service apply rule and your host object you don’t set this variable to true and therefore use the default of false from the check command
Have you tried running the script (as the executing icinga2 user) from the command line to see if it works there and to figure out what parametes you need?
You could try what “-d: add PerfParse compatible temperature output.” does. I have never tried it. And to be honest every sensor reading in a new line would make a huge output, which I don’t like.
If that does not work, you will have to change the script code that creates the output, I would assume.
That is the default behavior of the plugin.
If you want line breaks inside the output you will have to modify the script (or hope that @maze-m shares is modified version :))