Remove port for docker instances. Remove 'remove old files' tasks
This commit is contained in:
parent
013743f910
commit
11d0b46ef0
2 changed files with 9 additions and 9 deletions
|
@ -28,15 +28,6 @@
|
||||||
group: prometheus
|
group: prometheus
|
||||||
mode: 0755
|
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
|
- 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