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
app/vmalert: detect alerting rules which don't match any series at all #4198
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hagen1778
force-pushed
the
vmalert-check-stats
branch
from
April 26, 2023 09:30
1b07235
to
54a0da6
Compare
f41gh7
approved these changes
Apr 26, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #4198 +/- ##
==========================================
- Coverage 61.27% 61.25% -0.03%
==========================================
Files 329 329
Lines 58927 58992 +65
==========================================
+ Hits 36109 36134 +25
- Misses 20843 20880 +37
- Partials 1975 1978 +3
☔ View full report in Codecov by Sentry. |
zekker6
reviewed
Apr 26, 2023
zekker6
approved these changes
Apr 26, 2023
hagen1778
force-pushed
the
vmalert-check-stats
branch
from
April 26, 2023 10:00
affe92b
to
0365a3a
Compare
dmitryk-dk
reviewed
Apr 26, 2023
vmalert starts to understand /query responses which contain object: ``` "stats":{"seriesFetched": "42"} ``` If object is present, vmalert parses it and populates a new field `SeriesFetched`. This field is then used to populate the new metric `vmalert_alerting_rules_last_evaluation_series_fetched` and to display warnings in the vmalert's UI. If response doesn't contain the new object (Prometheus or VictoriaMetrics earlier than v1.90), then `SeriesFetched=nil`. In this case, UI will contain no additional warnings. And `vmalert_alerting_rules_last_evaluation_series_fetched` will be set to `-1`. Negative value of the metric will help to compile correct alerting rule in follow-up. Thanks for the initial implementation to @Haleygo See #4056 See #4039 Signed-off-by: hagen1778 <roman@victoriametrics.com>
Signed-off-by: hagen1778 <roman@victoriametrics.com>
Signed-off-by: hagen1778 <roman@victoriametrics.com>
hagen1778
force-pushed
the
vmalert-check-stats
branch
from
May 5, 2023 13:04
b1b52bc
to
7a12db7
Compare
valyala
pushed a commit
that referenced
this pull request
May 10, 2023
#4198) app/vmalert: detect alerting rules which don't match any series at all vmalert starts to understand /query responses which contain object: ``` "stats":{"seriesFetched": "42"} ``` If object is present, vmalert parses it and populates a new field `SeriesFetched`. This field is then used to populate the new metric `vmalert_alerting_rules_last_evaluation_series_fetched` and to display warnings in the vmalert's UI. If response doesn't contain the new object (Prometheus or VictoriaMetrics earlier than v1.90), then `SeriesFetched=nil`. In this case, UI will contain no additional warnings. And `vmalert_alerting_rules_last_evaluation_series_fetched` will be set to `-1`. Negative value of the metric will help to compile correct alerting rule in follow-up. Thanks for the initial implementation to @Haleygo See #4056 See #4039 Signed-off-by: hagen1778 <roman@victoriametrics.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
vmalert starts to understand /query responses which contain object:
If object is present, vmalert parses it and populates a new field
SeriesFetched
. This field is then used to populate the new metricvmalert_alerting_rules_last_evaluation_series_fetched
and to display warnings in the vmalert's UI.If response doesn't contain the new object (Prometheus or VictoriaMetrics earlier than v1.90), then
SeriesFetched=nil
. In this case, UI will contain no additional warnings. Andvmalert_alerting_rules_last_evaluation_series_fetched
will be set to-1
. Negative value of the metric will help to compile correct alerting rule in follow-up.Thanks for the initial implementation to @Haleygo
See #4056
See #4039