Installation Prometheus-postgres-exporter #53
2 changed files with 9 additions and 9 deletions
|
@ -28,15 +28,6 @@
|
||||||
group: prometheus
|
group: prometheus
|
||||||
mode: 0755
|
mode: 0755
|
||||||
pz2891 marked this conversation as resolved
Outdated
|
|||||||
|
|
||||||
- name: Remove old files
|
|
||||||
file:
|
|
||||||
path: "/etc/prometheus/{{ item }}"
|
|
||||||
state: absent
|
|
||||||
with_items:
|
|
||||||
- alert.rules.yml
|
|
||||||
- django.rules.yml
|
|
||||||
|
|
||||||
|
|
||||||
- name: Configure Prometheus alerts
|
- name: Configure Prometheus alerts
|
||||||
template:
|
template:
|
||||||
src: "{{ item }}.j2"
|
src: "{{ item }}.j2"
|
||||||
|
|
|
@ -100,6 +100,15 @@ scrape_configs:
|
||||||
file_sd_configs:
|
file_sd_configs:
|
||||||
- files:
|
- files:
|
||||||
- '/etc/prometheus/targets_docker.json'
|
- '/etc/prometheus/targets_docker.json'
|
||||||
|
relabel_configs:
|
||||||
|
# Do not put :8087 in instance name, rather here
|
||||||
|
- source_labels: [__address__]
|
||||||
|
target_label: __param_target
|
||||||
|
- source_labels: [__param_target]
|
||||||
|
target_label: instance
|
||||||
|
- source_labels: [__param_target]
|
||||||
|
target_label: __address__
|
||||||
|
replacement: '$1:8087'
|
||||||
|
|
||||||
- job_name: postgresql
|
- job_name: postgresql
|
||||||
file_sd_configs:
|
file_sd_configs:
|
||||||
|
|
Loading…
Reference in a new issue
Est-ce que c'est la peine de garder ces règles une fois que ça a été exécuté une fois sur le parc ?
Peut-être que le fichier
alert.rules.yml
est créé par défaut dans l'installation Debian ?