bundles/gitea: derive version number from installed gitea

This commit is contained in:
Franzi 2023-02-05 17:24:50 +01:00
parent 7dcad0d584
commit 1906e7c256
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -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',
},
},
},
},
}