Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mixin: Use sidecar's metric timestamp for healthcheck
During prometheus updates the alert was firing because the metric was initialized with a value of '0' before the first heartbeat was sent. As such, the evaluation of the alert results into actually taking just the value of time() into consideration which led to misleading information about the health of the sidecar. As the thanos_sidecar_last_heartbeat_success_time_seconds metric is effectively just a timestamp that resets on new deployments, we can simply wrap it around the timestamp() function which should return almost the same value of the metric itself with the added benefit that heartbeat resets will be ignored. Signed-off-by: Markos Chandras <markos@chandras.me>
- Loading branch information