Disable ping as service for a host in Icinga2

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)

Advertisements

One thought on “Disable ping as service for a host in Icinga2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s