45 lines
907 B
Plaintext
45 lines
907 B
Plaintext
|
/**
|
||
|
* 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"
|
||
|
}
|
||
|
|
||
|
{% if icinga2_server_custom_hostgroup is defined %}
|
||
|
object HostGroup "{{ icinga2_server_custom_hostgroup }}" {
|
||
|
display_name = "{{ icinga2_server_custom_hostgroup }}"
|
||
|
assign where host.vars.owner == "{{ icinga2_server_custom_hostgroup }}"
|
||
|
}
|
||
|
{% endif %}
|
||
|
/**
|
||
|
* 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 match("disk*", service.check_command)
|
||
|
}
|
||
|
|