GaugeMetricFamily Timestamp with Pushgateway

29 views
Skip to first unread message

Murali Krishna Kanagala

unread,
Aug 13, 2020, 2:01:35 AM8/13/20
to Prometheus Users
Hello everyone,

I am working on a tool to push historical metrics (1-5 min old) to push gateway.
I have tried using the Gauge form prometheus-client but it does not support setting an older timestamp.
GaugeMetricFamily seems to support it but i am not able to find an example of how to use it with push gateway.

Can someone help me with this?
--
Regards,
Murali Krishna Kanagala

Brian Candler

unread,
Aug 13, 2020, 3:45:10 AM8/13/20
to Prometheus Users
This won't work.  Most importantly, Prometheus itself does not allow ingestion of historical metrics in any form.  Furthermore, pushgateway is not intended to store history of a metric, just the most recent value.

You may want to look at another project. For example, VictoriaMetrics has a Prometheus-compatible query API, but also allows "push" and back-filling of historical data.
Reply all
Reply to author
Forward
0 new messages