bundles/pretalx: ignore update check if no version was specified

This commit is contained in:
Franzi 2022-11-27 19:48:13 +01:00
parent 6b2a6e64b3
commit ca18a8d231
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -50,12 +50,15 @@ defaults = {
'icinga2_api/pretalx/services',
)
def icinga_check_for_new_release(metadata):
version = metadata.get('pretalx/version')
if '.' not in version:
return {}
return {
'icinga2_api': {
'pretalx': {
'services': {
'PRETALX UPDATE': {
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_pypi_for_new_release pretalx {}'.format(metadata.get('pretalx/version')),
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_pypi_for_new_release pretalx {}'.format(version),
'vars.notification.mail': True,
'check_interval': '60m',
},