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 <https://tusimple.slack.com/archives/D01PNSZ0MEF>* *SRE of Infrastructure China* Kai Xue <[email protected]> 于2021年3月17日周三 下午2:22写道: > I also encountered the same problem, have you solved it over there? > > On Tuesday, November 3, 2020 at 4:06:06 AM UTC+8 [email protected] > wrote: > >> 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. >> > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/d3fc13c3-d588-4ed2-a485-a20fcccab089n%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/d3fc13c3-d588-4ed2-a485-a20fcccab089n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAGRfKW5BjSb8dMOBve7Wia-XSQYK8oy2TyZR6_OdORxKg36E3w%40mail.gmail.com.

