Skip to content

Labels missing in Output #900

Answered by csmarchbanks
sthellmuth asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, to answer a few of your questions!

I do this by passing a list of label names via the labelnames parameter and also a list of values by the _labelvalues parameter.

You should not be using _labelvalues, it is for internal use only hence being started with an underscore which is the python convention for private variables. Always use .labels().

Since the labelname labelvalues comes from a config file and i would like to be flexible about the number of labels this is not an an option for me.

The best way to do this is to always use the same number of labels, but set the value of the label you do not need to "". Prometheus treats an empty string the same as if the label was missing.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sthellmuth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants