fix(mixin): ThanosSidecarUnhealthy doesn't fire if the sidecar is never healthy #4342
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
ThanosSidecarUnhealthy
alert non functional by consideringthanos_sidecar_last_heartbeat_success_time_seconds
metric'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_seconds
where 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
for
clause inThanosSidecarUnhealthy
alert to improve it's usability, otherwise it would trigger immediately during sidecar boot-up.Fixes #3990