Skip to content
Snippets Groups Projects
Commit 14f22223 authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible/playbooks/general#106 Configure cronjobs healthcheck

parent 581b91c7
No related branches found
No related tags found
No related merge requests found
---
# file: roles/netdata/tasks/heartbeat.yml
- set_fact:
healthcheckping: "{{ lookup('healthchecks', '', base_url='https://healthchecks.lakedrops.com', api_key=healthchecks.api, host=inventory_hostname, user=item.1.user|default(cronUser), jobname='Heartbeat', schedule='* * * * *', channels=healthchecks.channels|join(',')) }}"
tags:
- cron
- name: Crontab for heartbeat
cron:
name: Heartbeat
job: '/usr/bin/curl -XPOST {{ netdata_alerta_webhook }}/heartbeat -H ''Authorization: Key {{ netdata_alerta_apikey }}'' -H ''Content-type: application/json'' -d ''{"origin":"{{ inventory_hostname }}","timeout":120,"attributes":{"environment":"{{ netdata_alerta_environment|default(''production'') }}"}}'' >/dev/null 2>&1'
job: '/usr/bin/curl -XPOST {{ netdata_alerta_webhook }}/heartbeat -H ''Authorization: Key {{ netdata_alerta_apikey }}'' -H ''Content-type: application/json'' -d ''{"origin":"{{ inventory_hostname }}","timeout":120,"attributes":{"environment":"{{ netdata_alerta_environment|default(''production'') }}"}}'' >/dev/null 2>&1 && {{ healthcheckping }}'
tags:
- cron
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