bundles/pretalx: ignore update check if no version was specified
This commit is contained in:
parent
6b2a6e64b3
commit
ca18a8d231
1 changed files with 4 additions and 1 deletions
|
@ -50,12 +50,15 @@ defaults = {
|
||||||
'icinga2_api/pretalx/services',
|
'icinga2_api/pretalx/services',
|
||||||
)
|
)
|
||||||
def icinga_check_for_new_release(metadata):
|
def icinga_check_for_new_release(metadata):
|
||||||
|
version = metadata.get('pretalx/version')
|
||||||
|
if '.' not in version:
|
||||||
|
return {}
|
||||||
return {
|
return {
|
||||||
'icinga2_api': {
|
'icinga2_api': {
|
||||||
'pretalx': {
|
'pretalx': {
|
||||||
'services': {
|
'services': {
|
||||||
'PRETALX UPDATE': {
|
'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,
|
'vars.notification.mail': True,
|
||||||
'check_interval': '60m',
|
'check_interval': '60m',
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue