Franziska Kunsmann
f514e200f0
All checks were successful
bundlewrap/pipeline/head This commit looks good
It seems neither WhatsApp nor WhatsApp Web are designed for 24/7 connections, thus leading to all kinds of weird side effects like "Bridge thinks it's connected, but no messages get through at all" or "WhatsApp is running, but the Bridge can't connect to it"
69 lines
2.2 KiB
Python
69 lines
2.2 KiB
Python
defaults = {
|
|
'apt': {
|
|
'packages': {
|
|
'libolm-dev': {},
|
|
'golang-go': {},
|
|
},
|
|
},
|
|
'cron': {
|
|
'restart_mautrix_whatsapp': '0 3 * * * root systemctl restart matrix-bridge-whatsapp.service',
|
|
},
|
|
'icinga2_api': {
|
|
'mautrix-whatsapp': {
|
|
'services': {
|
|
'MAUTRIX-WHATSAPP PROCESS': {
|
|
'command_on_monitored_host': '/usr/lib/nagios/plugins/check_procs -a mautrix-whatsapp -c 1:',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
'matrix-synapse': {
|
|
'appservice_configs': {
|
|
'/opt/mautrix-whatsapp/registration.yaml',
|
|
},
|
|
},
|
|
'mautrix-whatsapp': {
|
|
'database': {
|
|
'user': 'mautrix-whatsapp',
|
|
'password': repo.vault.password_for('{} postgresql mautrix-whatsapp'.format(node.name)),
|
|
'database': 'mautrix-whatsapp',
|
|
},
|
|
'as_token': repo.vault.password_for('{} mautrix-whatsapp as_token'.format(node.name)),
|
|
'hs_token': repo.vault.password_for('{} mautrix-whatsapp hs_token'.format(node.name)),
|
|
'sender_localpart': repo.vault.password_for('{} mautrix-whatsapp sender_localpart'.format(node.name)),
|
|
'provisioning': {
|
|
'enabled': False,
|
|
},
|
|
},
|
|
'postgresql': {
|
|
'roles': {
|
|
'mautrix-whatsapp': {
|
|
'password': repo.vault.password_for('{} postgresql mautrix-whatsapp'.format(node.name)),
|
|
},
|
|
},
|
|
'databases': {
|
|
'mautrix-whatsapp': {
|
|
'owner': 'mautrix-whatsapp',
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|
|
|
|
@metadata_reactor.provides(
|
|
'icinga2_api/mautrix-whatsapp/services',
|
|
)
|
|
def icinga_check_for_new_release(metadata):
|
|
return {
|
|
'icinga2_api': {
|
|
'mautrix-whatsapp': {
|
|
'services': {
|
|
'MAUTRIX-WHATSAPP UPDATE': {
|
|
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_github_for_new_release tulir/mautrix-whatsapp {}'.format(metadata.get('mautrix-whatsapp/version')),
|
|
'vars.notification.mail': True,
|
|
'check_interval': '60m',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|