[icinga-users] Overriding Ping4 thresholds

Thomas Gelf thomas.gelf at netways.de
Fri Nov 13 07:55:03 CET 2015

Hi Lance,

in the default configuration ping service checks should respect the
hosts ping_* custom vars. However, that's what you usually do not want.
The host check needs very high thresholds, you should be absolutely sure
before declaring a host down. But ping service checks should cry at much
lower thresholds. 30ms on a local network? Unacceptable. 150ms over WAN
links? Even on fiber? Well... it's physics, you know.

Configurations in conf.d are just examples. You should not fear to
adjust them to fit your needs or to even completely throw them away.
Ship your own apply rules, with Puppet of course as you're already doing
so. I personally would prefer to tell Puppet to ship them as plain
config files, no need for another level of abstraction here.

To be completely on the safe side, I prefer to include my very own
conf-pupped.d directory and ban conf.d from icinga2.conf. Provide such a
directory recursively with Puppet, that's basically what I do. In
addition to dynamically generated hosts of course. Future additional
config files shipped with upgrades for conf.d can now hardly break my

Once done so, you have all the flexibility you want:

apply Service "ping4" {
  import "generic-service"
  check_command = "ping4"
  assign where host.address && host.bandwith != "high"

apply Service "ping4" {
  import "generic-service"
  check_command = "ping4"
  assign where host.address && host.bandwith == "high"
  vars.ping_wrta = 50

Want many different thresholds? Introduce a new custom var. But please
note, check commands in the ITL should NOT be modified in place. If they
do not fit your needs, please clone them with a new name or eventually
"import" and extend the existing ones. You have the desire to modify
most of them? Well, copy them to your config directory and do not
"include" the original ones any more.


Am 12.11.2015 um 21:14 schrieb Lance Reed:
> I suspect my question has been answered multiple times in the past,
> but I am not easily finding answers so here goes.
> I have multiple remote locations that use VPNs, so ping latency can
> often go failure high and I get alerts on hosts and ping4 checks (the
> default checks).
> We use multiple custom vars for things like location, and environment etc.
> Because of this it was easy to setup in each hosts file created via
> puppet to override hostalive.
> e.g.
> object Host "somehost.abcd.com" {
>       import "generic-host"
> ...
>   vars.ping_wrta = "500"
>   vars.environment = "abcd"
>   vars.customer_monitored = "true"
>   vars.customer = "abcd"
>   vars.ping_cpl = "30"
> }
> That works well.  However the default service checks are using default
> attributes for ping4 which are not modified.
> I am wondering what people use to override default values for existing
> service checks that get applied.
> Or do I have to modify what type of check gets used in my host object
> and make sure the correct one is used much like hostalive.  I'd prefer
> not to have any more Custom Vars added to each host object if
> possible.
> Thanks in advance for any suggestions.
> L.
> _______________________________________________
> icinga-users mailing list
> icinga-users at lists.icinga.org
> https://lists.icinga.org/mailman/listinfo/icinga-users

Thomas Gelf
Principal Consultant

NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | thomas.gelf at netways.de

** OSMC 2015 - November - netways.de/osmc **
** OSDC 2016 - April – netways.de/osdc **

More information about the icinga-users mailing list