diff --git a/templates/monitor/sunetdrive_sites.cfg.erb b/templates/monitor/sunetdrive_sites.cfg.erb index f2edb66..5d075d5 100644 --- a/templates/monitor/sunetdrive_sites.cfg.erb +++ b/templates/monitor/sunetdrive_sites.cfg.erb @@ -186,10 +186,11 @@ define service { notes_url https://<%= site %>/status.php action_url /grafana/dashboard/script/histou.js?host=$HOSTNAME$&service=$SERVICEDISPLAYNAME$&theme=light&annotations=true <% if site.match('test') -%> - check_command check_nextcloud_version!'<%= @facts["nextcloud_version_test_#{cur_cust}"] %>' +<% version_variable = 'nextcloud_version_test_' << cur_cust -%> <% else -%> - check_command check_nextcloud_version!'<%= @facts["nextcloud_version_prod_#{cur_cust}"] %>' +<% version_variable = 'nextcloud_version_prod_' << cur_cust -%> <% end -%> + check_command check_nextcloud_version!'<%= @facts[version_variable] %>' check_interval 5 check_period 24x7 contact_groups naemon-admins