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
9.1.6 warn - rule declares one or many reserved labels. Those rules labels will be ignored #55670
Comments
I have the same issue |
Same here |
+1 |
Same here on 9.1.6. |
Same here, getting tons of logs on v9.1.6. Also new dashboard is not getting pick up, using json with the dashboards provisioning provider....
|
The same here - 9.1.7 didn't changed anything - several times a second logs the error appear |
Same here - 9.1.7 |
I think this happens when during migration from legacy alerting we add a label which is treated by the state manager code as user input. I think we can do the following:
|
I think that warning still makes sense in this case. It will make it visible that the labels\annotations in the notifications are not the same as the user configured. What do you think about a migration that would automatically remove the label |
Do not log a warning but log debug instead is a good idea. Remove alertname on migration is a good idea too if it goes to the title. Please have a look at invalid chars in old alertname and convert them too. I‘ve found out that / and \ are not allowed. But the migration had these chars put in. As a result you have to remove these chars before you can save a modified alert rule. |
This issue was removed from the 9.1.8 milestone because 9.1.8 is currently being released. |
I'm also seeing this on 9.2.2. |
I'm also seeing this on 9.2.2. too. However, there are places where the alarm is triggered and others where it is not sum by(role) (count_over_time({k8s_pod_name=~".*-grafana-.*"} |= `rule declares one or many reserved labels. Those rules labels will be ignored` [1m])) last query result: (roleB not triggered alarm but roleA, roleC triggered althhogh they almost same configuration)
|
Is anything stopping you from adding a migration like this for SQLite3? (For the users like us who have already migrated so fix for #56509 comes too late)
|
Let me know if I should make a new issue for this. I am getting this warning log, but for a different label than |
@d-shi, good catch! that's definitely a bug. The log context should contain rule UID. I will fix it. |
as for the automatic removal of the label
|
This issue has been automatically marked as stale because it has not had activity in the last year. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions! |
This issue has been automatically closed because it has not had any further activity in the last 30 days. Thank you for your contributions! |
this issue is still relevant |
What happened:
After update from Grafana 9.0.5 to 9.1.6 there are many entries in the grafana.log file like this:
logger=ngalert t=2022-09-23T07:21:00.353596477Z level=warn msg="rule declares one or many reserved labels. Those rules labels will be ignored" labels="alertname=test ssl"
What you expected to happen:
No warnings like in Grafana 9.0.5
How to reproduce it (as minimally and precisely as possible):
use the new alerting: unified_alerting enabled
update from Grafana 9.0.5 to 9.1.6
Anything else we need to know?:
Grafana itself added these two labels to all alarms during migration from alerting to unified alerting:
-alertname
-rule_uid
Now it seems that Grafana since version > 9.0.5 will add an entry in the logfile for the alertname label.
logger=ngalert t=2022-09-23T07:21:00.353596477Z level=warn msg="rule declares one or many reserved labels. Those rules labels will be ignored" labels="alertname=test ssl"
Environment:
Grafana version: 9.1.6
Data source type & version:
OS Grafana is installed on: as Docker image: grafana/grafana:9.1.6
User OS & Browser: Windows 10, Browser: Chrome
Grafana plugins:
grafana-clock-panel/
grafana-image-renderer/
grafana-piechart-panel/
grafana-polystat-panel/
grafana-simple-json-datasource/
grafana-singlestat-panel/
jdbranham-diagram-panel/
monitoringartist-monitoringart-datasource/
natel-plotly-panel/
novalabs-annotations-panel/
radensolutions-netxms-datasource/
ryantxu-ajax-panel/
savantly-heatmap-panel/
vonage-status-panel/
Others:
In the documentation, the only reserverd label for Grafana at this time 23.09.2022 is this label:
grafana_folder but not "alertname".
https://grafana.com/docs/grafana/latest/alerting/fundamentals/annotation-label/how-to-use-labels/
The (1) ist the label alertname that Grafana added during migration to unified alerting
The (2) seems to be another, identical internal Grafana label alertname.
By the way... what does it meen excactly: Those rules labels will be ignored?
Is the custom label "alertname" ignored while the same internal label alertname exists?
Is the result of the rule alertname="SSL Cert Expiry" in my example? (internal wins)
What is with other additional custom labels like rule_uid? Are they evaluated and an alarm is send even if a log warning is given about alertname?
The text was updated successfully, but these errors were encountered: