Commit 14f22223 authored by Jürgen Haas's avatar Jürgen Haas
Browse files

ansible/playbooks/general#106 Configure cronjobs healthcheck

parent 581b91c7
---
# 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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment