Skip to content

Conversation

caarlos0
Copy link
Member

added a new metric that reports the timestamp of the latest SUCCESS/PARTIAL snapshot.

This should make it easier to alert things like X time since the last snapshot, even more helpful when you have some sort of repository rotation (e.g. each month has a new repository / s3 bucket, and we keep up to 2 old repositories there).

with this metric the alert rule could be:

(time() - max without (repository) elasticsearch_snapshot_stats_latest_snapshot_timestamp) > X

Thanks!

Signed-off-by: Carlos Alexandro Becker <[email protected]>
@caarlos0 caarlos0 requested a review from zwopir January 22, 2020 13:03
Signed-off-by: Carlos Alexandro Becker <[email protected]>
Copy link
Member

@zwopir zwopir left a comment

Choose a reason for hiding this comment

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

as commented (metric name). Looks good otherwise

@caarlos0 caarlos0 requested a review from zwopir January 28, 2020 12:51
@caarlos0
Copy link
Member Author

done.

Copy link
Member

@zwopir zwopir left a comment

Choose a reason for hiding this comment

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

I'd like to have the information that this is a timestamp in the metric name. It's a bit longer, but just _seconds doesn't provide the information. I'm also fine with _ts_seconds.

@caarlos0 caarlos0 requested a review from zwopir January 28, 2020 14:04
@caarlos0
Copy link
Member Author

@zwopir done

@grobie
Copy link

grobie commented Jan 28, 2020

Great, thanks @caarlos0! I'm happy to see the explicit names, with tab completion in prometheus and grafana, abbreviations should be rather avoided.

@caarlos0
Copy link
Member Author

Me too 🙏

@zwopir
Copy link
Member

zwopir commented Jan 28, 2020

thanks again for the PR, @caarlos0 !

@zwopir zwopir merged commit c4c7d2b into prometheus-community:master Jan 28, 2020
@caarlos0 caarlos0 deleted the latest-snap-metric branch January 28, 2020 20:55
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.

3 participants