bundlewrap/bundles/mautrix-telegram/metadata.py
Franziska Kunsmann 9651d740ae
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles/icinga2: add check_sipgate_account_balance, adjust check_interval
2020-11-22 11:38:53 +01:00

59 lines
1.9 KiB
Python

defaults = {
'apt': {
'packages': {
'ffmpeg': {},
},
},
'icinga2_api': {
'mautrix-telegram': {
'services': {
'MAUTRIX-TELEGRAM PROCESS': {
'command_on_monitored_host': '/usr/lib/nagios/plugins/check_procs -a mautrix-telegram -c 1:',
},
},
},
},
'matrix-synapse': {
'appservice_configs': {
'/opt/mautrix-telegram/registration.yaml',
},
},
'mautrix-telegram': {
'database': {
'user': 'mautrix-telegram',
'password': repo.vault.password_for('{} postgresql mautrix-telegram'.format(node.name)),
'database': 'mautrix-telegram',
},
'as_token': repo.vault.password_for('{} mautrix-telegram as_token'.format(node.name)),
'hs_token': repo.vault.password_for('{} mautrix-telegram hs_token'.format(node.name)),
'sender_localpart': repo.vault.password_for('{} mautrix-telegram sender_localpart'.format(node.name)),
},
'postgresql': {
'roles': {
'mautrix-telegram': {
'password': repo.vault.password_for('{} postgresql mautrix-telegram'.format(node.name)),
},
},
'databases': {
'mautrix-telegram': {
'owner': 'mautrix-telegram',
},
},
},
}
@metadata_reactor
def icinga_check_for_new_release(metadata):
return {
'icinga2_api': {
'mautrix-telegram': {
'services': {
'MAUTRIX-TELEGRAM UPDATE': {
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_github_for_new_release tulir/mautrix-telegram {}'.format(metadata.get('mautrix-telegram/version')),
'check_interval': '60m',
},
},
},
},
}