From 1906e7c25689bc1be6c3da4ba67331cf6715c3b6 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sun, 5 Feb 2023 17:24:50 +0100 Subject: [PATCH] bundles/gitea: derive version number from installed gitea --- bundles/gitea/metadata.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/bundles/gitea/metadata.py b/bundles/gitea/metadata.py index 7a69b32..2b9bcbe 100644 --- a/bundles/gitea/metadata.py +++ b/bundles/gitea/metadata.py @@ -26,6 +26,11 @@ defaults = { 'FORGEJO PROCESS': { 'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_systemd_unit gitea', }, + 'FORGEJO UPDATE': { + 'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_forgejo_for_new_release codeberg.org forgejo/forgejo v$(gitea --version | cut -d" " -f3)', + 'vars.notification.mail': True, + 'check_interval': '60m', + }, }, }, }, @@ -99,15 +104,4 @@ def nginx(metadata): ) def icinga_check_for_new_release(metadata): return { - 'icinga2_api': { - 'gitea': { - 'services': { - 'FORGEJO UPDATE': { - 'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_forgejo_for_new_release codeberg.org forgejo/forgejo v{}'.format(metadata.get('gitea/version')), - 'vars.notification.mail': True, - 'check_interval': '60m', - }, - }, - }, - }, }