Use the correct equality operator for Prometheus Alerts
Summary
The alerts interface currently allows =
as the equality operator instead of ==
. Prometheus requires the use of ==
https://prometheus.io/docs/prometheus/latest/querying/operators/#comparison-binary-operators
If =
is used as the equality operator a syntax error is returned from Prometheus and no alerts will be updated.
Screenshots
Steps to reproduce
Add any alert using the =
operator
Example Project
What is the current bug behavior?
Adding all alerts to Prometheus silently fails
What is the expected correct behavior?
Alerts using equality operators are sent to prometheus and work
Relevant logs and/or screenshots
Pod logs:
level=error ts=2019-10-21T23:05:07.494875469Z caller=manager.go:656 component="rule manager" msg="loading groups failed" err="group \"production.rules\", rule 3, \"More requests\": could not parse expression: parse error at char 66: could not parse remaining input \"= 0.1\"..."
level=error ts=2019-10-21T23:05:07.49691446Z caller=main.go:643 msg="Failed to apply configuration" err="error loading rules, previous rule set restored"
level=error ts=2019-10-21T23:05:07.499299278Z caller=main.go:484 msg="Error reloading config" err="one or more errors occurred while applying the new configuration (--config.file=\"/etc/config/prometheus.yml\")"
Output of checks
Silent failure