Installation Prometheus-postgres-exporter #53
2 changed files with 38 additions and 37 deletions
|
@ -33,6 +33,7 @@
|
||||||
- alerts.rules.yml
|
- alerts.rules.yml
|
||||||
- django.rules.yml
|
- django.rules.yml
|
||||||
|
|
||||||
|
|
||||||
- name: Configure Prometheus alerts
|
- name: Configure Prometheus alerts
|
||||||
template:
|
template:
|
||||||
src: "{{ item }}.j2"
|
src: "{{ item }}.j2"
|
||||||
|
|
|
@ -10,41 +10,41 @@ groups:
|
||||||
- name: docker.rules
|
- name: docker.rules
|
||||||
rules:
|
rules:
|
||||||
|
|
||||||
- alert: ContainerDown
|
- alert: ContainerDown
|
||||||
expr: docker_container_running_state
|
expr: docker_container_running_state != 1
|
||||||
for: 0m
|
for: 0m
|
||||||
labels:
|
labels:
|
||||||
severity: critical
|
severity: critical
|
||||||
annotations:
|
annotations:
|
||||||
summary: >-
|
summary: >-
|
||||||
Container Docker mort
|
Container Docker mort
|
||||||
(instance {{ raw('$labels.instance') }}, container {{ raw('$labels.name') }})
|
(instance {{ raw('$labels.instance') }}, container {{ raw('$labels.name') }})
|
||||||
|
|
||||||
- alert: ContainerFailed
|
- alert: ContainerFailed
|
||||||
expr: sum(increase(docker_container_restart_count[5m])) > 2
|
expr: sum(increase(docker_container_restart_count[5m])) > 2
|
||||||
for: 0m
|
for: 0m
|
||||||
labels:
|
labels:
|
||||||
severity: critical
|
severity: critical
|
||||||
annotations:
|
annotations:
|
||||||
summary: >-
|
summary: >-
|
||||||
Container Docker redémarre souvent
|
Container Docker redémarre souvent
|
||||||
(instance raw('{{ $labels.instance') }}, container {{ raw('$labels.name') }})
|
(instance {{ raw('$labels.instance') }}, container {{ raw('$labels.name') }})
|
||||||
|
|
||||||
- alert: ContainerFailed
|
- alert: ContainerFailed
|
||||||
expr:
|
expr:
|
||||||
(
|
(
|
||||||
docker_container_cpu_used_total
|
docker_container_cpu_used_total
|
||||||
/
|
/
|
||||||
docker_container_cpu_capacity_total
|
docker_container_cpu_capacity_total
|
||||||
) * 100
|
) * 100
|
||||||
> 30
|
> 30
|
||||||
for: 0m
|
for: 0m
|
||||||
labels:
|
labels:
|
||||||
severity: critical
|
severity: critical
|
||||||
annotations:
|
annotations:
|
||||||
summary: >-
|
summary: >-
|
||||||
Container Docker utilise beaucoup de CPU
|
Container Docker utilise beaucoup de CPU
|
||||||
(instance {{ raw('$labels.instance') }}, container {{ raw('$labels.name') }},
|
(instance {{ raw('$labels.instance') }}, container {{ raw('$labels.name') }},
|
||||||
value {{ raw('$value | printf "%.1f"'') }})
|
value {{ raw('$value | printf "%.1f"') }})
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
Loading…
Reference in a new issue