Add some prometheus alerts
This commit is contained in:
parent
6282c13db6
commit
11eb833f44
4 changed files with 19 additions and 0 deletions
|
@ -0,0 +1,6 @@
|
||||||
|
groups:
|
||||||
|
- name: blackbox
|
||||||
|
rules:
|
||||||
|
- alert: HttpSuccess
|
||||||
|
expr: probe_success{job="blackbox_http_external"} == 0
|
||||||
|
for: 5m
|
|
@ -14,6 +14,7 @@ services:
|
||||||
user: "{{ docker_user.id }}"
|
user: "{{ docker_user.id }}"
|
||||||
volumes:
|
volumes:
|
||||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||||
|
- ./alert-rules.d:/etc/prometheus/alert-rules.d:ro
|
||||||
- /mnt/tank/dbs/prometheus/forrest/:/prometheus/
|
- /mnt/tank/dbs/prometheus/forrest/:/prometheus/
|
||||||
networks:
|
networks:
|
||||||
- default
|
- default
|
||||||
|
|
|
@ -4,6 +4,9 @@ alerting:
|
||||||
- targets:
|
- targets:
|
||||||
- alertmanager:9093
|
- alertmanager:9093
|
||||||
|
|
||||||
|
rule_files:
|
||||||
|
- /etc/prometheus/alert-rules.d/*.yml
|
||||||
|
|
||||||
scrape_configs:
|
scrape_configs:
|
||||||
- job_name: pve
|
- job_name: pve
|
||||||
static_configs:
|
static_configs:
|
||||||
|
|
|
@ -42,3 +42,12 @@
|
||||||
owner: "{{ docker_user.name }}"
|
owner: "{{ docker_user.name }}"
|
||||||
notify: restart prometheus
|
notify: restart prometheus
|
||||||
become: true
|
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
|
||||||
|
|
Loading…
Reference in a new issue