Icinga2 disable ping checks on specific hosts

Problem:

You have a server which does not answer ping etc.
Icinga2 marks the host as critical and you want to get rid of it.
Solution

By default, Icinga2 applies to every host the service ping4 or ping6 (depending on the address). This is done with an apply rule in
 /etc/icinga2/conf.d/services.conf:
apply Service "ping4" {
import "generic-service"
check_command = "ping4"
assign where host.address
}

To disable it for two specific host you only have to add an ignore rule (ping4):

ignore where match("x.x.x.x", host.address) || match("y.y.y.y", host.address)

example:-

ignore where match("1.2.3.4", host.address) || match("5.6.7.8", host.address)

No comments:

Post a Comment