Skip to content

Commit

Permalink
prometheus: enforce osd nodes in templates
Browse files Browse the repository at this point in the history
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.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1947695

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 664dae0)
  • Loading branch information
guits committed May 26, 2021
1 parent 0eed858 commit 8b4eb0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/ceph-prometheus/templates/prometheus.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ scrape_configs:
{% endfor %}
- job_name: 'node'
static_configs:
{% 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 }}']
labels:
instance: "{{ hostvars[host]['ansible_facts']['nodename'] }}"
Expand Down

0 comments on commit 8b4eb0f

Please sign in to comment.