-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Thanos rule does not add labels to recording rules #7902
Comments
Hey @atos-cosmin-gavagiuc, I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this issue together! Thanos Rule processes and applies labels from PrometheusRule configurations by allowing you to specify labels that can be added or overwritten before storing the result of rule evaluations. This is done within the rule configuration files using the Ensure that the external labels specified when running Thanos Rule do not overwrite the labels defined in your recording rules. External labels are crucial for distinguishing high-availability pairs and ensuring that the data is correctly identified in a multi-cluster setup. If these external labels are set, they might replace the source labels, affecting the visibility of your custom labels. Additionally, verify that the Thanos Querier is correctly configured to fan-out to all known Rules endpoints and that the deduplication process is not affecting the visibility of your labels. The deduplication logic involves several levels, including rule group level, rule type, rule name, rule label names, and rule expression fields, which might impact how labels are displayed [1][2]. |
Hi @atos-cosmin-gavagiuc, I am trying to reproduce the issue myself. I can confirm that labels are missing in Thanos Ruler UI so this is something we need to fix. Recording rule metrics have the correct label present so this is not an issue. Can you please double check? How did you know that your metric doesn't have the correct label. If the label is really missing probably some set up issue on your querier. |
Hi @yeya24 , I can confirm that the recording rule now has the correct label. I'm not sure why it was missing initially, perhaps I didn't wait long enough. |
What happened:
Labels added to
recording rules
through PrometheusRule are not visible in Thanos rule, even though they are present in the container configuration and appear in the Thanos API.What you expected to happen:
Add labels to recording rules added to Thanos Rule as specified in the Recording Rules documentation
How to reproduce it (as minimally and precisely as possible):
Recording rule:
The recording rule is correctly loaded in Thanos, including the lables specified in the configuration.
The labels declared in the recording rule are missing the Thanos rules dashboard and from the metric labels.
Full logs to relevant components:
Anything else we need to know:
Thanos version 0.35.1
The text was updated successfully, but these errors were encountered: