VictoriaMetrics: Increase() sometimes doesn't show increase for new series
Describe the bug
In the screenshot below there are two metrics, tests_foo and tests_bar emitted as a counter (but constant) and scraped by vmagent every 15s. Then there is increase() function applied to both. The tests_bar metric shows the correct increase, but tests_foo does not.

To Reproduce Start two new series with non-zero counter value, and apply increase function.
Expected behavior Consistent behaviour of Increase() taking the previous point as 0, and calculate the increase accordingly.
Version
# victoria-metrics-prod --version
victoria-metrics-20201205-115122-tags-v1.49.0-0-gae1db8fa0
Used command-line flags
/victoria-metrics-prod --storageDataPath=/vmdata --graphiteListenAddr=:2003 --httpListenAddr=:8428 -selfScrapeInterval=0
Additional context Works fine when the previous data point is 0. I’m assuming this is related to the staleness handling, but all the samples have a constant scrape interval.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (3 by maintainers)
Commits related to this issue
- Add increase_pure function, which doesnt have edge-case tricks compared to increase function Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/962 — committed to VictoriaMetrics/metricsql by valyala 6 years ago
- app/vmselect/promql: add `increase_pure()` function to MetricsQL Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/962 — committed to VictoriaMetrics/VictoriaMetrics by valyala 6 years ago
- app/vmselect/promql: add `increase_pure()` function to MetricsQL Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/962 — committed to VictoriaMetrics/VictoriaMetrics by valyala 6 years ago
- vmselect/rollup: rm workaround for slow-changing counters The workaround was introduced to fix https://github.com/VictoriaMetrics/VictoriaMetrics/issues/962. However, it didn't prove itself useful. I... — committed to VictoriaMetrics/VictoriaMetrics by hagen1778 4 years ago
- vmselect/rollup: rm workaround for slow-changing counters (#3163) The workaround was introduced to fix https://github.com/VictoriaMetrics/VictoriaMetrics/issues/962. However, it didn't prove itself ... — committed to VictoriaMetrics/VictoriaMetrics by hagen1778 4 years ago
- vmselect/rollup: rm workaround for slow-changing counters (#3163) The workaround was introduced to fix https://github.com/VictoriaMetrics/VictoriaMetrics/issues/962. However, it didn't prove itself ... — committed to VictoriaMetrics/VictoriaMetrics by hagen1778 4 years ago
- vmselect/rollup: rm workaround for slow-changing counters (#3163) The workaround was introduced to fix https://github.com/VictoriaMetrics/VictoriaMetrics/issues/962. However, it didn't prove itself ... — committed to VictoriaMetrics/VictoriaMetrics by hagen1778 4 years ago
- vmselect/rollup: rm workaround for slow-changing counters (#3163) The workaround was introduced to fix https://github.com/VictoriaMetrics/VictoriaMetrics/issues/962. However, it didn't prove itself ... — committed to VictoriaMetrics/VictoriaMetrics by hagen1778 4 years ago
It’s disappointing that
increase_pure()was added.We want to converge towards VictoriaMetrics having a good showing from Prometheus test suites. Please leave the Prometheus functions as they’re commonly understood when possible, and make new functions for significant departures…