Skip to content
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

fix(mixin): ThanosSidecarUnhealthy doesn't fire if the sidecar is never healthy #4342

Merged
merged 3 commits into from
Jun 23, 2021
Merged

fix(mixin): ThanosSidecarUnhealthy doesn't fire if the sidecar is never healthy #4342

merged 3 commits into from
Jun 23, 2021

Conversation

arajkumar
Copy link
Contributor

@arajkumar arajkumar commented Jun 14, 2021

This PR reverts #3204 as it makes ThanosSidecarUnhealthy alert non functional by considering thanos_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.

t t+1 t+2 t+3
100 100 100 100

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 in ThanosSidecarUnhealthy alert to improve it's usability, otherwise it would trigger immediately during sidecar boot-up.

Fixes #3990

…#3979)"

This reverts commit 5139e33.

Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
@arajkumar arajkumar changed the title fix(mixin): revert #3204 and add for clause in ThanosSidecarUnhealthy alert fix(mixin): ThanosSidecarUnhealthy doesn't fire if the sidecar is never healthy Jun 15, 2021
@arajkumar arajkumar marked this pull request as ready for review June 15, 2021 07:56
…er healthy

Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
Copy link
Contributor

@dgrisonnet dgrisonnet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

cc @bwplotka @onprem

Copy link
Member

@onprem onprem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks. I just have a small non-blocking comment.

mixin/alerts/sidecar.libsonnet Show resolved Hide resolved
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ThanosSidecarUnhealthy doesn't fire if the sidecar is never healthy
5 participants