Skip to content

Commit fc25323

Browse files
authored
fix vars for sharding sd files
1 parent f0bb865 commit fc25323

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ansible/roles/prometheus/defaults/main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ prometheus_web_config:
4141
basic_auth_users: {}
4242

4343
# Prometheus customized arguments
44+
# -------------------------------
4445
prometheus_enable_target_sharding: false
45-
sharding_ignorances: []
46+
# Job names to ignore sharding
47+
prometheus_sharding_ignorances: []
4648

4749
# Configuration file options
4850
# --------------------------

ansible/roles/prometheus/tasks/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
source: "{{ prometheus_config_dir }}/prometheus.yml"
9292
modulus: "{{ groups['prometheus'] | length }}"
9393
hash_value: "{{ groups['prometheus'].index(inventory_hostname) }}"
94-
ignorances: "{{ sharding_ignorances }}"
94+
ignorances: "{{ prometheus_sharding_ignorances }}"
9595
when: prometheus_enable_target_sharding | bool
9696

9797
- name: Find file_sd configurations on prometheus hosts
@@ -110,6 +110,7 @@
110110
source: "{{ item.path }}"
111111
modulus: "{{ groups['prometheus'] | length }}"
112112
hash_value: "{{ groups['prometheus'].index(inventory_hostname) }}"
113+
ignorances: "{{ prometheus_sharding_ignorances }}"
113114
loop: "{{ host_file_sd.files }}"
114115
when:
115116
- prometheus_enable_target_sharding | bool

0 commit comments

Comments
 (0)