promql

18 views
Skip to first unread message

raghu padaki

unread,
Jun 30, 2020, 10:59:52 AM6/30/20
to Prometheus Users
need help for writing promql query to populate metrics
i am using prometheus to integrate mongodb

Brian Candler

unread,
Jul 1, 2020, 3:18:46 AM7/1/20
to Prometheus Users
Prometheus is not a general-purpose database.

You cannot populate data using PromQL - there is no "insert" statement equivalent.

In fact, you cannot populate data into Prometheus' internal time series database (TSDB) in any way at all, except by having Prometheus scrape the data from an exporter.  You cannot backfill historical data, for instance.

You *can* get Prometheus to write data to a remote storage system, and read it back again.  There are some integrations here.  I don't see mongodb listed, so you might end up having to write that yourself.

It could be that some other system will suit your needs better - TimescaleDB, InfluxDB, VictoriaMetrics etc.
Reply all
Reply to author
Forward
0 new messages