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

Can I set the time in metrics for the graphite-proxy? #8

Closed
bemeyert opened this issue Aug 23, 2022 · 2 comments
Closed

Can I set the time in metrics for the graphite-proxy? #8

bemeyert opened this issue Aug 23, 2022 · 2 comments

Comments

@bemeyert
Copy link

Hi all,

I'm not sure if this is the right place. So pls point me to the right one if this question belongs somewhere else.

With Graphite I can set the metric time and they get written as such to the Whisper-file. With this I could store historical data or data which were a bit "older". AFAIK This doesn't work with Prometheus since it sets the time itself to now(). Can I do this with your graphite-proxy and Mimir?

BTW I luv what your doing here. No more dedicated Graphite and Prometheus installations!

Many thanks

@jesusvazquez
Copy link
Member

👋 @bemeyert , this place is fine for the issue 👍

With Graphite I can set the metric time and they get written as such to the Whisper-file.

This is because you're doing push writes so you send a list metrics with pairs of timestamps and values and graphite just writes them into the whisper files, is that right?

AFAIK This doesn't work with Prometheus since it sets the time itself to now()

This is right if you rely on prometheus scraping your metrics, they are pull based writes so prometheus sets the timestamp to the time of the scrape. However you could write metrics using the remote write endpoint and set the timestamps yourself. This is however not the mainstream way of using prometheus.

Can I do this with your graphite-proxy and Mimir?

Yes it is possible to do this for two reasons:

  • Our graphite proxy supports the graphite API so you can do push writes just like you've been doing so far.
  • Mimir has now support for out-of-order samples https://github.com/grafana/mimir/releases/tag/mimir-2.2.0 although it is flagged as experimental. You'd have to enable this feature and increase the out of order time window to the amount of time you require.

Hope that helps!

@bemeyert
Copy link
Author

@jesusvazquez Guess that settles it. I will try out that feature, Much appreciated 🙏

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

No branches or pull requests

2 participants