/*
 * Service apply rules.
 *
 * Only applied if host objects are members of
 * the groups `linux-server` or `windows-server`
 * and having the `address` resp. `address6`
 * attribute set.
 *
 * The CheckCommand objects `ping4` and `ping6`
 * are provided by the plugin check command templates.
 * Check the documentation for details.
 */

apply Service "ping4" {
  import "generic-service"

  check_command = "ping4"
  vars.sla = "24x7"

  assign where "linux-servers" in host.groups
  assign where "windows-servers" in host.groups
  ignore where host.address == ""
}

apply Service "ping6" {
  import "generic-service"

  check_command = "ping6"
  vars.sla = "24x7"

  assign where "linux-servers" in host.groups
  assign where "windows-servers" in host.groups
  ignore where host.address6 == ""
}

