From f1276d52d38cd1a847b1760cc5bba31699b9eba1 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Mon, 24 Apr 2023 15:51:49 +0200 Subject: [PATCH] Fingers crossed --- templates/monitor/sunetdrive_sites.cfg.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/monitor/sunetdrive_sites.cfg.erb b/templates/monitor/sunetdrive_sites.cfg.erb index 58ae990..490bf24 100644 --- a/templates/monitor/sunetdrive_sites.cfg.erb +++ b/templates/monitor/sunetdrive_sites.cfg.erb @@ -186,11 +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') -%> -<% version_variable = 'nextcloud_version_test_' << cur_cust -%> +<% version_variable = 'nextcloud_version_test_' << site.sub('/\.drive.*/','') -%> <% else -%> -<% version_variable = 'nextcloud_version_prod_' << cur_cust -%> +<% version_variable = 'nextcloud_version_prod_' << site.sub('/\.drive.*/','') -%> <% end -%> - check_command check_nextcloud_version!'<%= version_variable %>' + check_command check_nextcloud_version!'<%= @facts[version_variable] %>' check_interval 5 check_period 24x7 contact_groups naemon-admins