Skip to content
Snippets Groups Projects
Commit 6721756b authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible/playbooks/general#106 Configure cronjobs healthcheck

parent 34e2e2e0
No related branches found
No related tags found
No related merge requests found
......@@ -27,4 +27,4 @@
name: Elasticsearch backup
hour: 2
minute: 0
job: /usr/local/bin/elasticsearch-snapshot >/dev/null 2>&1
job: /usr/local/bin/elasticsearch-snapshot >/dev/null 2>&1 && {{ lookup('healthchecks', '', base_url='https://healthchecks.lakedrops.com', api_key=healthchecks.api, host=inventory_hostname, user='root', jobname='Elasticsearch backup', schedule='0 2 * * *', channels=healthchecks.channels|join(',')) }}
......@@ -22,7 +22,7 @@
name: Elasticsearch Purge {{ item.index }}
hour: 0
minute: 10
job: /usr/local/bin/elasticpurge.py elastic {{ elasticsearch.users.elastic|default("") }} {{ item.index }} {{ item.retention }} {{ item.mode }} >>/var/log/elasticsearch/purge.log 2>&1
job: /usr/local/bin/elasticpurge.py elastic {{ elasticsearch.users.elastic|default("") }} {{ item.index }} {{ item.retention }} {{ item.mode }} >>/var/log/elasticsearch/purge.log 2>&1 && {{ lookup('healthchecks', '', base_url='https://healthchecks.lakedrops.com', api_key=healthchecks.api, host=inventory_hostname, user='root', jobname=['Elasticsearch Purge ', item.index]|join(''), schedule='10 0 * * *', channels=healthchecks.channels|join(',')) }}
disabled: '{{ item.disabled|default(false) }}'
with_items: '{{ elasticsearch.purge }}'
tags:
......
......@@ -14,7 +14,7 @@
name: Elasticsearch Remove Readonly
hour: 5
minute: 55
job: /usr/local/bin/elasticsearch-remove-readonly >>/var/log/elasticsearch/readonly.log 2>&1
job: /usr/local/bin/elasticsearch-remove-readonly >>/var/log/elasticsearch/readonly.log 2>&1 && {{ lookup('healthchecks', '', base_url='https://healthchecks.lakedrops.com', api_key=healthchecks.api, host=inventory_hostname, user='root', jobname='Elasticsearch Remove Readonly', schedule='55 5 * * *', channels=healthchecks.channels|join(',')) }}
disabled: '{{ crons_disabled|default(false) }}'
tags:
- cron
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment