fix(mixin): ThanosSidecarUnhealthy doesn't fire if the sidecar is never healthy#4342
Merged
onprem merged 3 commits intothanos-io:mainfrom Jun 23, 2021
arajkumar:fix-sidecar-health-alert
Merged
fix(mixin): ThanosSidecarUnhealthy doesn't fire if the sidecar is never healthy#4342onprem merged 3 commits intothanos-io:mainfrom arajkumar:fix-sidecar-health-alert
onprem merged 3 commits intothanos-io:mainfrom
arajkumar:fix-sidecar-health-alert
Conversation
for clause in ThanosSidecarUnhealthy alert…er healthy Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
onprem
approved these changes
Jun 23, 2021
Member
onprem
left a comment
There was a problem hiding this comment.
LGTM! Thanks. I just have a small non-blocking comment.
2 tasks
This file contains hidden or 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
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.
This PR reverts #3204 as it makes
ThanosSidecarUnhealthyalert non functional by consideringthanos_sidecar_last_heartbeat_success_time_secondsmetric's timestamp instead of it's actual value for alerting.timestamp(..)function is associated with each scrape and regardless of the metric's value it's timestamp would be updated.Consider the following scenario for
thanos_sidecar_last_heartbeat_success_time_secondswhere the heat-beat completed only once.When applying
timestamp(thanos_sidecar_last_heartbeat_success_time_seconds)on the above series values, it will always give us time at which scarp completed for this metrics.In addition to above change, added a
forclause inThanosSidecarUnhealthyalert to improve it's usability, otherwise it would trigger immediately during sidecar boot-up.Fixes #3990