Skip to content

Fix Grafana HAProxy dashboard (again) #782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

priteau
Copy link
Member

@priteau priteau commented Nov 14, 2023

The previous commit to this file [1] added port numbers to the instance
label regex. This is compatible with the default Prometheus targets
generated by Kolla Ansible, which look like this:

192.168.1.1:9101

However, when using a non-default instance label [2], the port number is
absent, which breaks the dashboard (all panels are empty).

Modify the regex to make the port number optional, which should support
all possible instance labels.

Note: I first tried using $host:([0-9]+)? but it does not appear to be
supported by Prometheus, which uses RE2 [3].

[1] eceee82
[2] https://docs.openstack.org/kolla-ansible/latest/reference/logging-and-monitoring/prometheus-guide.html#metric-instance-labels
[3] https://github.com/google/re2/wiki/Syntax

The previous commit to this file [1] added port numbers to the instance
label regex. This is compatible with the default Prometheus targets
generated by Kolla Ansible, which look like this:

    192.168.1.1:9101

However, when using a non-default instance label [2], the port number is
absent, which breaks the dashboard (all panels are empty).

Modify the regex to make the port number optional, which should support
all possible instance labels.

Note: I first tried using `$host:([0-9]+)?` but it does not appear to be
supported by Prometheus, which uses RE2 [3].

[1] eceee82
[2] https://docs.openstack.org/kolla-ansible/latest/reference/logging-and-monitoring/prometheus-guide.html#metric-instance-labels
[3] https://github.com/google/re2/wiki/Syntax
@priteau priteau requested a review from a team as a code owner November 14, 2023 16:16
@priteau priteau self-assigned this Nov 14, 2023
@markgoddard markgoddard merged commit 5d66109 into stackhpc/yoga Nov 15, 2023
@markgoddard markgoddard deleted the haproxy-dashboard-instance-label branch November 15, 2023 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants