Cannot find data in Prometheus with InfluxDB remote write/read api

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-08 10:22:17

问题


InfluxDB announced Prometheus remote write/read api in ver1.4.

https://docs.influxdata.com/influxdb/v1.4/supported_protocols/prometheus/ https://www.influxdata.com/blog/influxdb-now-supports-prometheus-remote-read-write-natively/

I have deployed a new InfluxDB, created a user called "paul" with password 'foo', created a database called "prometheus" and filled with sample data:

Then, I modified the config yml of Prometheus (I found the '*' in influx doc example should be replaced by '-')

I believe Prometheus and InfluxDB are communicating:

However, I cannot find the sample measurement I inserted in InfluxDB.

I am sure I must miss something simple.... Did I do any silly mistakes? Thanks


回答1:


We found that the metrics were all put into a single measurement called '_' within the INfluxDB database that we chose (called "metrics", in our case) with the field being 'f64' (float64, I assume). The Prometheus measurement name was attached as a label: 'name'. So, in my experience, the InfluxDB query for your measurement above might be something like:

select "f64" from "prometheus"."_" where "__name__" = "prometheus_target_interval_length_seconds_count"


来源:https://stackoverflow.com/questions/48221953/cannot-find-data-in-prometheus-with-influxdb-remote-write-read-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!