It is possible to write to prometheus tsdb directly using java or python code?

20 views
Skip to first unread message

Lei Wang

unread,
Jul 28, 2020, 3:58:58 AM7/28/20
to Prometheus Users

Promethes is using Pull Model, the prometheus server pull data from exporter/pushgateway and write to tsdb periodicly 

It is possible to write to prometheus tsdb directly using java or python code?

Thanks,
Lei 

Brian Candler

unread,
Jul 28, 2020, 4:57:41 AM7/28/20
to Prometheus Users
No.  Prometheus does not accept "push" writing of data, nor any back-filling of historical data.

If you want to do these things then have a look at some alternative projects, especially VictoriaMetrics which is strongly Prometheus-inspired.  It has the ability to ingest and backfill via a wide range of protocols and formats, and implements a superset of PromQL so you can query it just as if it were a Prometheus server.
Reply all
Reply to author
Forward
0 new messages