Fix service assignments

This commit is contained in:
Jan Dittberner 2023-08-15 17:57:42 +02:00
parent 4bac805e3f
commit fe891ee886
3 changed files with 10 additions and 4 deletions

View file

@ -0,0 +1,4 @@
// vim: set ft=icinga2 et sw=2 ts=2 si ai:
object HostGroup "monitoring" {
display_name = "Monitoring Servers"
}

View file

@ -17,7 +17,7 @@ apply Service "icinga" {
check_command = "icinga"
assign where "generic-host" in host.groups
assign where true
}
apply Service "procs" {
@ -25,7 +25,7 @@ apply Service "procs" {
check_command = "procs"
assign where "generic-host" in host.groups
assign where true
}
apply Service "proc-" for (proc => config in host.vars.procs) {
@ -35,7 +35,7 @@ apply Service "proc-" for (proc => config in host.vars.procs) {
vars += config
assign where "procs" in host.vars
assign where host.vars.disks
}
apply Service "disk-" for (disk => config in host.vars.disks) {
@ -45,5 +45,5 @@ apply Service "disk-" for (disk => config in host.vars.disks) {
vars += config
assign where "disks" in host.vars
assign where host.vars.disks
}

View file

@ -2,6 +2,8 @@
object Host "beholder" {
import "debian-host"
groups += [ "monitoring" ]
address = "127.0.0.1"
address6 = "::1"