Skip to content

Remote write gives an out of bounds error #12887

Answered by dgl
voltagex asked this question in Q&A
Discussion options

You must be logged in to vote

I think your issue is sample.timestamp = int(time.time()) -- you're using a Unix epoch timestamp in seconds, whereas Prometheus expects a value in milliseconds (see the spec at https://prometheus.io/docs/concepts/remote_write_spec/), so Prometheus sees this as a very old sample and hence gives the out-of-order error.

Note that Prometheus acting as a remote write receiver is still a relatively new feature. Depending how delayed data you wish to insert, you might be interested in the experimental option out_of_order_time_window (see https://prometheus.io/docs/prometheus/latest/configuration/configuration/#tsdb).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@voltagex
Comment options

Answer selected by voltagex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants