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 upALERT labels do not overwrite. #1678
Comments
This comment has been minimized.
This comment has been minimized.
|
Overwritten should probably be used as the labels from the rule are more likely to be important in routing. |
beorn7
added
kind/bug
priority/P2
labels
May 27, 2016
This comment has been minimized.
This comment has been minimized.
|
OK, important is to bring the behavior in line with the documentation then. I'm not sure if we really need the prefixing. It's only for an alerting rule, so we are not really throwing data away. It's all under control of the user. |
This comment has been minimized.
This comment has been minimized.
|
If the rule labels have precedence, what happens when overriding a label results in duplicate alerts? Should they just be deduped then? |
This comment has been minimized.
This comment has been minimized.
|
yes, or if it's easier, sent double and deduped in Alertmanager
|
This comment has been minimized.
This comment has been minimized.
|
Prefixing isn't required (can be done by an additional label if needed), and with the default receiver templates would just cause noise for those using it. |
This comment has been minimized.
This comment has been minimized.
|
If the label override creates duplicate alerts (== time series), it should be handled in the same way as we handle duplicate time series created by rules in general (via label replacement or plainly by duplicate rules). At the moment, we just silently feed the results into the same time series. That's not ideal, but if we want to change the behavior, we should do it consistently and not create a one-off solution just for |
This comment has been minimized.
This comment has been minimized.
|
The is a bug in |
This comment has been minimized.
This comment has been minimized.
|
I have a fix, unittests will take some time though. |
brian-brazil
added a commit
that referenced
this issue
Jul 12, 2016
This comment has been minimized.
This comment has been minimized.
|
Fix is at https://github.com/prometheus/prometheus/compare/am-label but github won't let me create a PR. |
brian-brazil
added this to the v1.0.0 milestone
Jul 12, 2016
fabxc
closed this
in
#1807
Jul 13, 2016
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 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. |
beorn7 commentedMay 27, 2016
https://prometheus.io/docs/alerting/rules/ reads (about
LABELSinALERTrules): "Any existing conflicting labels will be overwritten."That doesn't seem to be true. Existing labels are left intact, and the newly added label is ignored in case of a conflict.
Either we need to fix the docs, or the code.
What's the intended behavior? @brian-brazil @fabxc