How query data with PromQL from Influxdb with remote_read configuration in Prometheus

859 views
Skip to first unread message

Andrej Dorinec

unread,
Nov 2, 2020, 3:06:06 PM11/2/20
to Prometheus Users
Hi to everyone,

I would like to make PromQL query over influxdb database data. According to documentation, I configured remote_read in pormetheus configuration file. Then, I create database pometheus in influxdb and create measurement named mymetric and insert there 10 values:

> use prometheus Using database prometheus
> select * from mymetric 
name: mymetric 
time type value
 ---- ---- ----- 
1604262435942881813    B 1 
1604262437459302370    B 2 
1604262440173123935    B 3 
1604262441637944365    B 4 
1604262443156839758    B 5 
1604262444871165072    B 6 
1604262446436865145    B 7 
1604262448095138304    B 8 
1604262449753490166    B 9 
1604262451728886523    B 10

I can see influx logs, that prometheus is trying to reach endpoint and is successful:

```
influxdb-test | [httpd] 192.168.16.2 - - [01/Nov/2020:20:32:20 +0000] "POST /api/v1/prom/read?db=prometheus HTTP/1.1" 200 4 "-" "Go-http-client/1.1" 5702f0b8-1c81-11eb-8158-0242c0a81005 271
influxdb-test | [httpd] 192.168.16.2 - - [01/Nov/2020:20:32:20 +0000] "POST /api/v1/prom/read?db=prometheus HTTP/1.1" 200 4 "-" "Go-http-client/1.1" 57032f67-1c81-11eb-8159-0242c0a81005 222
```
According to me, now I should be able to see mymetric in prometheus. But I don't see any metric besides some basics metrics like scrape_*up, etc...

What am I doing wrong, How should I reach metrics from influx database prometheus?

Versions:
Influx: 1.8.3
Prometheus: v2.1.0

Thank you.

Kai Xue

unread,
Mar 17, 2021, 2:22:47 AM3/17/21
to Prometheus Users
I also encountered the same problem, have you solved it over there?

Kai Xue

unread,
Mar 17, 2021, 9:50:33 PM3/17/21
to Prometheus Users

I think i solved this problem, I thought prometheus can directly read the data in influxdb, but it only supports reading his remote_write data.

--
Regards
Kai Xue
slack link
SRE of Infrastructure China


Kai Xue <kai...@tusimple.ai> 于2021年3月17日周三 下午2:22写道:
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/d3fc13c3-d588-4ed2-a485-a20fcccab089n%40googlegroups.com.

Aliaksandr Valialkin

unread,
Mar 18, 2021, 12:27:48 PM3/18/21
to Kai Xue, Prometheus Users
If you need querying Influx data with PromQL, then take a look at VictoriaMetrics - it accepts Influx line protocol data ( https://victoriametrics.github.io/#how-to-send-data-from-influxdb-compatible-agents-such-as-telegraf ) and it supports PromQL-like query language - MetricsQL ( https://victoriametrics.github.io/MetricsQL.html ). Additionally, it requires a lower amount of resources compared to InfluxDB - https://valyala.medium.com/insert-benchmarks-with-inch-influxdb-vs-victoriametrics-e31a41ae2893 .



--
Best Regards,

Aliaksandr Valialkin, CTO VictoriaMetrics
Reply all
Reply to author
Forward
0 new messages