From 516601760e4d2fd13310e26852e50fbf47e322ce Mon Sep 17 00:00:00 2001 From: Karl Goetz Date: Thu, 2 Mar 2017 12:03:10 +1100 Subject: [PATCH] Make adding hostgroup_name all conditional This was supposed to be but I forgot the wrapper. Without adding this conditionally all hostgroups are monitored even though a specific list is set higher in the service template. This means systems that shouldn't be monitored, are. --- templates/services.cfg.tmpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/services.cfg.tmpl b/templates/services.cfg.tmpl index 054a990..9582fb0 100644 --- a/templates/services.cfg.tmpl +++ b/templates/services.cfg.tmpl @@ -22,6 +22,8 @@ define service{ {% endfor %} {# We can have multiple sources but its good to have this one as default. Fills in any gaps left by supplied #} use generic-service - hostgroup_name all + {% if item.hostgroup_name is not defined %} + hostgroup_name all + {% endif %} }