Add some prometheus alerts

This commit is contained in:
Jake Howard 2023-02-19 18:31:52 +00:00
parent 6282c13db6
commit 11eb833f44
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,6 @@
groups:
- name: blackbox
rules:
- alert: HttpSuccess
expr: probe_success{job="blackbox_http_external"} == 0
for: 5m

View file

@ -14,6 +14,7 @@ services:
user: "{{ docker_user.id }}"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ./alert-rules.d:/etc/prometheus/alert-rules.d:ro
- /mnt/tank/dbs/prometheus/forrest/:/prometheus/
networks:
- default

View file

@ -4,6 +4,9 @@ alerting:
- targets:
- alertmanager:9093
rule_files:
- /etc/prometheus/alert-rules.d/*.yml
scrape_configs:
- job_name: pve
static_configs:

View file

@ -42,3 +42,12 @@
owner: "{{ docker_user.name }}"
notify: restart prometheus
become: true
- name: Install prometheus alert rules
copy:
src: files/prometheus/alert-rules.d/
dest: /opt/prometheus/alert-rules.d/
mode: "{{ docker_compose_file_mask }}"
owner: "{{ docker_user.name }}"
notify: reload prometheus
become: true