Fix Grafana HAProxy dashboard (again) #782
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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 besupported 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