Remove port for docker instances. Remove 'remove old files' tasks

This commit is contained in:
pz2891 2021-04-14 20:00:16 +02:00
parent 013743f910
commit 11d0b46ef0
2 changed files with 9 additions and 9 deletions

View file

@ -28,15 +28,6 @@
group: prometheus
mode: 0755
- name: Remove old files
file:
path: "/etc/prometheus/{{ item }}"
state: absent
with_items:
- alert.rules.yml
- django.rules.yml
- name: Configure Prometheus alerts
template:
src: "{{ item }}.j2"

View file

@ -100,6 +100,15 @@ scrape_configs:
file_sd_configs:
- files:
- '/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
file_sd_configs: