Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upprometheus read remote influxdb Invalid after a period of time #4739
Comments
simonpasquier
added
the
component/remote storage
label
Oct 15, 2018
This comment has been minimized.
This comment has been minimized.
|
Please share the logs of the Prometheus server. Anything relevant in the InfluxDB logs? |
This comment has been minimized.
This comment has been minimized.
|
@simonpasquier Hi simon, there is no obvious error logs and the grafana chart is below |
This comment has been minimized.
This comment has been minimized.
|
Try running with |
This comment has been minimized.
This comment has been minimized.
|
@simonpasquier net_conntrack*{dialer_name="remote_storage"} return no data |
This comment has been minimized.
This comment has been minimized.
try this |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Hi simon, I check the influxdb logs 172.18.0.12,172.16.68.221 - - [15/Oct/2018:21:30:52 +0800] "POST /query?db=prometheus&epoch=ms¶ms=%7B%7D&q=SELECT+value+FROM+%22autogen%22.%2F%5Enet_conntrack.%2B%24%2F+WHERE+%22dialer_name%22+%3D+%27remote_storage%27+AND+time+%3E%3D+1539566700000ms+AND+time+%3C%3D+1539604800000ms+GROUP+BY+%2A HTTP/1.1" 200 4285 "-" "InfluxDBClient" 8950769b-d07e-11e8-ba06-000000000000 22427 I query the data on 21:30:52 but prometheus filter the data before 20:00(1539604800000), there are some other same logs. The last query time stop at 20:00... @simonpasquier |
This comment has been minimized.
This comment has been minimized.
|
You may need to tweak the https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_read |
This comment has been minimized.
This comment has been minimized.
|
The parameter means to qeury data from remote storage each time ,but I don't have local storage .. |
This comment has been minimized.
This comment has been minimized.
|
Which flags do you use to start Prometheus? |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
There's always local storage. |
This comment has been minimized.
This comment has been minimized.
|
You means prometheus get data and cache them into memory. But when I refresh grafana, I always can see a read request to influxdb and the time of intercepting the data is not correct just like above log. @simonpasquier |
This comment has been minimized.
This comment has been minimized.
|
Can you confirm that you use the native InfluxDB remote read endpoint? |
This comment has been minimized.
This comment has been minimized.
|
I set read_recent to true and the problem has been solved , thank you . But |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
|
All clocks are synchronized but they are in different time zones. One write prometheus is in UTC time zone and others in UTC + 8:00 timezone. @simonpasquier � |
This comment has been minimized.
This comment has been minimized.
|
It shouldn't matter for Prometheus as all times are converted to UTC. I can't say for InfluxDB. |
This comment has been minimized.
This comment has been minimized.
|
It shouldn't matter for InfluxDB because writring to InfluxDB is totally OK . The error is that the time period for fetching data is incorrect when remote_read and remote_write are assigned to different machines. |
This comment has been minimized.
This comment has been minimized.
liuzhi1986
commented
Jan 23, 2019
|
I have the same problem. |


cxhuawei commentedOct 15, 2018
•
edited by simonpasquier
Proposal
Use case. Why is this important?
“Nice to have” is not a good use case. :)
Bug Report
What did you do?
Two prometheus write data to influxdb.
An other prometheus read data from influxdb by influxdb's api and grafana generates charts.
What did you expect to see?
Prometheus can get data from influxdb.
What did you see instead? Under which circumstances?
It worked properly and after some hours it can not get newly added data. If you restart the read prometheus , it will be ok again.
Environment
centos 7
System information:
Linux 3.10.0-693.2.2.el7.x86_64 x86_64
insert output of
uname -srmherePrometheus version:
2.4.3
insert output of
prometheus --versionhereAlertmanager version:
insert output of
alertmanager --versionhere (if relevant to the issue)Prometheus configuration file: