Victoriametrics: incorrect result with timestamp offset modifier

Created on 13 Apr 2020  路  4Comments  路  Source: VictoriaMetrics/VictoriaMetrics

Describe the bug
Offset modifier been ignored

To Reproduce

timestamp(up{job="prometheus"} offset 1h)
time() - timestamp(up{job="prometheus"} offset 2d)

Expected behavior
correct result.

Screenshots

Version

$ ./vmstorage -version
vmstorage-20200213-163134-tags-v1.33.1-cluster-0-gafecb344
bug

All 4 comments

Confirmed the bug. Temporary workaround is to put offset outside timestamp() call:

timestamp(up{job="prometheus"}) offset 1h
time() - (timestamp(up{job="prometheus"}) offset 2d)

The bug should be fixed in the commit 6f7f64f757b27740d3d3644677a836c274fa9cc9 . This commit will be included in the next release.

@mxlxm , could you build VictoriaMetrics from 6f7f64f757b27740d3d3644677a836c274fa9cc9 commit according to the docs and verify whether the issue is fixed there?

@valyala verified, it works. Great job!

The bugfix is available starting from v1.34.8. Closing the issue as fixed.

Was this page helpful?
0 / 5 - 0 ratings