-
Notifications
You must be signed in to change notification settings - Fork 529
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
alerts: Fix MimirIngesterHasNotShippedBlocks for other deployment modes #3627
alerts: Fix MimirIngesterHasNotShippedBlocks for other deployment modes #3627
Conversation
70adca1
to
845db53
Compare
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.
Thanks @jhesketh for addressing my feedback. I left few comments, but overall the approach LGTM.
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.
Thanks, this looks like better approach. My comments are not blocking.
This fixes the job regex for monolithic and read-write deployment modes for MimirIngesterHasNotShippedBlocks and MimirIngesterHasNotShippedBlocksSinceStart
Use the new mimir_ingester_shipper_bucket_last_successful_upload_time metric which only counts for ingester shipper rather than any uploaded blocks.
Co-authored-by: Marco Pracucci <marco@pracucci.com>
ed98e87
to
aa350a6
Compare
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.
Logic changes LGTM!
Some suggestions to unit test it:
- You could add the assertions to the test
TestShipper()
. - Since we can't assert on the exact timestamp (it would be unreliable) we can't assert on the actual
/metrics
output. However, you can get the metric value usingtestutil.ToFloat64(s.metrics. lastSuccessfulUploadTime)
and assert on a value with a delta toleration (e.g. now +/- 2 seconds). You can assert value is 0 before the 1st upload, then updated afterSync()
is called for the first time.
…sNotShippedBlocks # Conflicts: # CHANGELOG.md
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 (modulo a couple of nit I'm going to self-merge if you don't mind). Thanks!
…es (grafana#3627) * alerts: Fix MimirIngesterHasNotShippedBlocks for other deployment modes This fixes the job regex for monolithic and read-write deployment modes for MimirIngesterHasNotShippedBlocks and MimirIngesterHasNotShippedBlocksSinceStart * Update CHANGELOG * Add new metric for tracking last shipped block time * Update IngesterHasNotShippedBlocks to use new metric Use the new mimir_ingester_shipper_bucket_last_successful_upload_time metric which only counts for ingester shipper rather than any uploaded blocks. * Apply suggestions from code review Co-authored-by: Marco Pracucci <marco@pracucci.com> * Update CHANGELOG * Update alert to use new metric * Fix gauge type * Update helm test * Group code a bit cleaner * Add test for new metric * Apply suggestions from code review Co-authored-by: Marco Pracucci <marco@pracucci.com>
What this PR does
This fixes the job regex for monolithic and read-write deployment modes for MimirIngesterHasNotShippedBlocks and MimirIngesterHasNotShippedBlocksSinceStart
Which issue(s) this PR fixes or relates to
Partial fixes #3366
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]