diff --git a/templates/app.yaml b/templates/app.yaml index f0a49a7a6e37f540249ff76895acb9acb4c22b65..c2a35ebf4e28e99fe7ac135a366ca91e84223a78 100644 --- a/templates/app.yaml +++ b/templates/app.yaml @@ -36,10 +36,12 @@ hooks: port: 3306 username: '{{ application_id }}' password: '{{ application_id }}' - options: '--skip-comments' + options: '--skip-comments --no-tablespaces' before_backup: - echo "`date` - Starting backup" after_backup: - echo "`date` - Finished backup" +{% if alerta_apikey is defined %} on_error: - - /usr/local/bin/alertalerta.py{% if netdata_alerta_project_id is defined %} --pid={{ netdata_alerta_project_id }}{% endif %} {{ inventory_hostname }} {{ netdata_alerta_environment|default("production") }} {{ netdata_alerta_webhook }} {{ netdata_alerta_apikey }} '{"service":["https://www.borgbase.com"],"resource":"{{ inventory_hostname }}","event":"Borg {configuration_filename}","value":"{{ application }} {{ application_id }} {repository}","text":"Borg {configuration_filename}","rawData":"{output}"}' + - echo -n '{"service":["https://www.borgbase.com"],"resource":"{{ inventory_hostname }}","event":"Borg {configuration_filename}","value":"{{ application }} {{ application_id }} {repository}","text":"Borg {configuration_filename}","rawData":"{output}"}' | nc -u -w1 alerta {{ alerta_proxy_port|default(20002) }} +{% endif %}