Commit e63a487a authored by Guillaume Abrioux's avatar Guillaume Abrioux
Browse files

prometheus: enforce osd nodes in templates

When osd nodes are collocated in the clients group (HCI context for
instance), the current logic will exclude osd nodes since they are
present in the client group.

The best fix would be to exclude clients node only when they are not
member of another group but for now, as a workaround, we can enforce
the addition of osd nodes to fix this specific case.


Signed-off-by: default avatarGuillaume Abrioux <>
(cherry picked from commit 664dae05)
parent dc0d0280
......@@ -19,7 +19,7 @@ scrape_configs:
{% endfor %}
- job_name: 'node'
{% for host in (groups['all'] | difference(groups[grafana_server_group_name]|union(groups.get(client_group_name, [])))) %}
{% for host in (groups['all'] | difference(groups[grafana_server_group_name] | union(groups.get(client_group_name, []))) | union(groups.get(osd_group_name, []))) %}
- targets: ['{{ host }}:{{ node_exporter_port }}']
instance: "{{ hostvars[host]['ansible_facts']['nodename'] }}"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment