summaryrefslogtreecommitdiff
path: root/playbooks/roles/mon/templates/volumes
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/roles/mon/templates/volumes')
-rw-r--r--playbooks/roles/mon/templates/volumes/gatus/config/config.yml82
-rw-r--r--playbooks/roles/mon/templates/volumes/gatus/data/.gitkeep (renamed from playbooks/roles/mon/templates/volumes/data/.gitkeep)0
-rw-r--r--playbooks/roles/mon/templates/volumes/prometheus/config.yml39
3 files changed, 121 insertions, 0 deletions
diff --git a/playbooks/roles/mon/templates/volumes/gatus/config/config.yml b/playbooks/roles/mon/templates/volumes/gatus/config/config.yml
new file mode 100644
index 0000000..2d1c0ef
--- /dev/null
+++ b/playbooks/roles/mon/templates/volumes/gatus/config/config.yml
@@ -0,0 +1,82 @@
+metrics: true
+
+endpoints:
+ - name: "HealthCheck"
+ url: "{{ healthchecks_io_ping }}"
+ interval: 60s
+ conditions:
+ - "[STATUS] == 200"
+ - "[BODY] == pat(*OK*)"
+
+ - name: "Expiration For {{ domain }}"
+ url: "https://{{ domain }}"
+ interval: 30m
+ conditions:
+ - "[DOMAIN_EXPIRATION] > 720h"
+ - "[CERTIFICATE_EXPIRATION] > 240h"
+
+ - name: "LDAPS"
+ url: "tls://{{ idm_domain }}:3636"
+ interval: 5m
+ client:
+ timeout: 5s
+ conditions:
+ - "[CONNECTED] == true"
+ - "[CERTIFICATE_EXPIRATION] > 48h"
+
+{% for port in [465,993] %}
+ - name: "mail on port {{ port }}"
+ group: "mail"
+ url: "tls://{{ mail_domain }}:{{ port }}"
+ interval: 5m
+ client:
+ timeout: 5s
+ conditions:
+ - "[CONNECTED] == true"
+ - "[CERTIFICATE_EXPIRATION] > 48h"
+{% endfor %}
+
+{% for user, m in mesh.items() %}
+{% for healthcheck in m.public_healthchecks %}
+ - name: "healthcheck {{ user }} pub {{ healthcheck }} 200"
+ group: "{{ user }}_pub"
+ url: "{{ healthcheck }}"
+ interval: 1m
+ conditions:
+ - "[STATUS] == 200"
+{% endfor %}
+{% for healthcheck in m.private_healthchecks %}
+ - name: "healthcheck {{ user }} priv {{ healthcheck }}"
+ url: "{{ healthcheck }}"
+ group: "{{ user }}_priv"
+ interval: 1m
+ conditions:
+ - "[STATUS] == 200"
+ - name: "healthcheck {{ user }} pub {{ healthcheck }} 403"
+ group: "{{ user }}_priv"
+ url: "{{ healthcheck }}"
+ client:
+ dns-resolver: "tcp://1.1.1.1:53"
+ interval: 1m
+ conditions:
+ - "[STATUS] == 403"
+{% endfor %}
+{% for record in m.private_records %}
+ - name: "DNS Check [{{ record.name }}_{{ record.type }}]"
+ group: "{{ user }}_dns_private"
+ url: "{{ m.gateway }}"
+ interval: 5m
+ dns:
+ query-name: "{{ record.name }}"
+ query-type: "{{ record.type }}"
+ conditions:
+ - "[BODY] == {{ record.ip }}"
+ - "[DNS_RCODE] == NOERROR"
+
+ - name: "PING {{ record.name }}"
+ group: "{{ user }}_dns_private"
+ url: "icmp://{{ record.name }}"
+ conditions:
+ - "[CONNECTED] == true"
+{% endfor %}
+{% endfor %}
diff --git a/playbooks/roles/mon/templates/volumes/data/.gitkeep b/playbooks/roles/mon/templates/volumes/gatus/data/.gitkeep
index e69de29..e69de29 100644
--- a/playbooks/roles/mon/templates/volumes/data/.gitkeep
+++ b/playbooks/roles/mon/templates/volumes/gatus/data/.gitkeep
diff --git a/playbooks/roles/mon/templates/volumes/prometheus/config.yml b/playbooks/roles/mon/templates/volumes/prometheus/config.yml
new file mode 100644
index 0000000..be59f7f
--- /dev/null
+++ b/playbooks/roles/mon/templates/volumes/prometheus/config.yml
@@ -0,0 +1,39 @@
+global:
+ scrape_interval: 20s
+
+scrape_configs:
+ - job_name: prometheus
+ static_configs:
+ - targets:
+ - mon_prometheus:9090
+
+ - job_name: gatus
+ static_configs:
+ - targets:
+ - mon_mon:8080
+
+ - job_name: oauth-proxy
+ static_configs:
+ - targets:
+ - traefik_oauth2-proxy:5577
+
+ - job_name: traefik
+ static_configs:
+ - targets:
+ - traefik_traefik:5577
+
+ - job_name: headscale
+ static_configs:
+ - targets:
+ - "{{ headscale_host }}:443"
+ basic_auth:
+ username: '{{ metrics_htpasswd_user }}'
+ password: '{{ metrics_htpasswd_passwd }}'
+
+ - job_name: outbound
+ static_configs:
+ - targets:
+ - "{{ outbound_domain }}:443"
+ basic_auth:
+ username: '{{ metrics_htpasswd_user }}'
+ password: '{{ metrics_htpasswd_passwd }}'