-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different result same query to Prometheus and VictoriaMetrics #237
Comments
This issue can be related to the fact that Prometheus and VictoriaMetrics differently calculate
IMHO, VictoriaMetrics' calculations are better than Prometheus' in this case, since they never return floating-point values for integer counter increase. In order to prove the assumption, could you post graphs for the following query on both Prometheus and VictoriaMetrics on the same time range as graphs above?
This will allow calculating manually |
@a-illiushchenia , are there any updates? |
Yes, and it is wery interesting:
We have increace 1 point and it dispay correct in Prometheus and VictoriaMetrics: Prometheus: VictoriaMetrics:
Prometheus: VictoriaMetrics: |
Hi @a-illiushchenia ! |
We found the prometheus implementations of increase and delta pretty useless for our data, as the extrapolation performed in the functions does not deliver correct results, Usually actual increases in the metric are ignored. This is why we replaced our queries
with:
This (although requiring double lookups of the series) correct results and does not miss increases of a time series. |
@a-illiushchenia , the graphs show that Prometheus returns incorrect @lammel , great solution! Note that the query can be improved with
The resulting query would look like:
|
@valyala , the extended promql looks very polished. We will look into VM soon with the prometheus remote write setup. Do the increase/delta functions work correct without extrapolation in victoria metrics (can I assume no increase is missed)? |
Yes, both functions in VictoriaMetrics should return the exact increase / delta on the given time window in square brackets. If the time window is missing, then it is equal to |
As for PromQL, it is great, but unfortunately it cannot be used with Promxy yet, since it understands only standard PromQL :( There are plans to fix this in the future - see this issue for details. |
@a-illiushchenia , I'm going to close this issue as |
this do not process application restart that causes metric reset |
Describe the bug
I use same query to Prometheus and VictoriaMetrics in Grafana, but have different graphs in Grafana (see screenshots):
To Reproduce
Use one query to Prometheus and VictoriaMetrics
Expected behavior
Graphs must be same
Screenshots
Graph for prometheus:
Graph for victoriaMetric:
Version
victoria-metrics-20190822-120009-tags-v1.26.0-0-g1272e407
Additional context
The text was updated successfully, but these errors were encountered: