From 568cb87ad681760c02c14a4d41881d27974deffb Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Mon, 24 Apr 2023 16:21:22 +0200 Subject: [PATCH] Trim version --- templates/monitor/sunetdrive_sites.cfg.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/monitor/sunetdrive_sites.cfg.erb b/templates/monitor/sunetdrive_sites.cfg.erb index 0c878bb..e557533 100644 --- a/templates/monitor/sunetdrive_sites.cfg.erb +++ b/templates/monitor/sunetdrive_sites.cfg.erb @@ -190,7 +190,8 @@ define service { <% else -%> <% version_variable = 'nextcloud_version_prod_' << cur_cust -%> <% end -%> - check_command check_nextcloud_version!'<%= scope.lookupvar(version_variable) %>' +<% version = scope.lookupvar(version_variable).gsub(/-[0-9]+,'') -%> + check_command check_nextcloud_version!'<%= version %>' check_interval 5 check_period 24x7 contact_groups naemon-admins