Skip to content
Snippets Groups Projects
Commit 49259ce2 authored by jurgenhaas's avatar jurgenhaas
Browse files

#2 Fix mysql backup in apps and update alerta command

parent 6e4328d0
No related branches found
No related tags found
No related merge requests found
...@@ -36,10 +36,12 @@ hooks: ...@@ -36,10 +36,12 @@ hooks:
port: 3306 port: 3306
username: '{{ application_id }}' username: '{{ application_id }}'
password: '{{ application_id }}' password: '{{ application_id }}'
options: '--skip-comments' options: '--skip-comments --no-tablespaces'
before_backup: before_backup:
- echo "`date` - Starting backup" - echo "`date` - Starting backup"
after_backup: after_backup:
- echo "`date` - Finished backup" - echo "`date` - Finished backup"
{% if alerta_apikey is defined %}
on_error: 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 %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment