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.

increase-mistmatch

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

Most upvoted comments

I think increase_pure() function should be added without all the heuristics mentioned above, so it always returns the expected results for pure counters that always start from 0.

Rather, please reserve increase() for the behavior and counter intended use defined by Prometheus, and make a different function that has heuristics for dubious counter usage.

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…