Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRegex match unable to match missing labels #3712
Comments
This comment has been minimized.
This comment has been minimized.
|
Is this on Prometheus 2.0.0? It should be fixed in 2.1.0. |
This comment has been minimized.
This comment has been minimized.
|
yes prometheus 2.0.0, i'll try with 2.1.0 |
This comment has been minimized.
This comment has been minimized.
|
I presume this is all working now. |
brian-brazil
closed this
Feb 2, 2018
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
lock
bot
locked and limited conversation to collaborators
Mar 22, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
SharpEdgeMarshall commentedJan 19, 2018
Issue
my_metric{my_label=""}matches whenmy_labelis empty or missingmy_metric{my_label=~".*"}matches only whenmy_labelis emptyThis difference in behaviour is misleading and actually there is no workaround.
Use case
Need to match a label
my_labelwith a Grafana template variable$Myvar, it should be possible to match also all values ofmy_labelso regex matching must be used with.*but there is no way to match metrics wheremy_labelis missing.my_metric{my_label=~"^$Myvar$"}