diff --git a/ansible/roles/grafana/templates/consul_service.json b/ansible/roles/grafana/templates/consul_service.json index db10bf63a..7c02bf926 100644 --- a/ansible/roles/grafana/templates/consul_service.json +++ b/ansible/roles/grafana/templates/consul_service.json @@ -4,6 +4,12 @@ "tags": [ "db" ], + "checks": [{ + "id": "grafana-ping", + "http": "http://{{ ansible_ssh_host }}:3000/api/health", + "interval": "15s", + "failures_before_critical": 4 + }], "port": 3000 } } diff --git a/ansible/roles/prometheus/templates/consul_service.json b/ansible/roles/prometheus/templates/consul_service.json index 93cd305d3..ce79f9697 100644 --- a/ansible/roles/prometheus/templates/consul_service.json +++ b/ansible/roles/prometheus/templates/consul_service.json @@ -4,6 +4,12 @@ "tags": [ "db" ], + "checks": [{ + "id": "prometheus-ping", + "http": "http://{{ ansible_ssh_host }}:9090/metrics", + "interval": "15s", + "failures_before_critical": 4 + }], "port": 9090 } } \ No newline at end of file