diff --git a/global-templates/hostgroups.conf b/global-templates/hostgroups.conf new file mode 100644 index 0000000..c5a9be5 --- /dev/null +++ b/global-templates/hostgroups.conf @@ -0,0 +1,4 @@ +// vim: set ft=icinga2 et sw=2 ts=2 si ai: +object HostGroup "monitoring" { + display_name = "Monitoring Servers" +} diff --git a/global-templates/services.conf b/global-templates/services.conf index df9be2d..f8f19bb 100644 --- a/global-templates/services.conf +++ b/global-templates/services.conf @@ -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 } diff --git a/master/hosts.conf b/master/hosts.conf index e044119..4014589 100644 --- a/master/hosts.conf +++ b/master/hosts.conf @@ -2,6 +2,8 @@ object Host "beholder" { import "debian-host" + groups += [ "monitoring" ] + address = "127.0.0.1" address6 = "::1"