/**
 * Host group examples.
 */

object HostGroup "linux-servers" {
  display_name = "Linux Servers"

  assign where host.vars.os == "Linux"
}

object HostGroup "windows-servers" {
  display_name = "Windows Servers"

  assign where host.vars.os == "Windows"
}

{% for group in host_groups %}
object HostGroup "{{group.name}}" {

  display_name = "{{group.display_name}}"
  assign where host.vars.os == "{{group.os}}"

}
{% endfor %}
/**
 * Service group examples.
 */

object ServiceGroup "ping" {
  display_name = "Ping Checks"

  assign where match("ping*", service.name)
}

object ServiceGroup "http" {
  display_name = "HTTP Checks"

  assign where match("http_*", service.check_command)
}

object ServiceGroup "disk" {
  display_name = "Disk Checks"

  assign where service.check_command == "disk"
}

