-
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
range query: timestamps are inconsistent on year range #5392
Comments
Hello @melck!
Could you elaborate more on step not respected? Could it be that grafana interprets received timestamps according to the light-time-saving changes? |
Hi @hagen1778 Sorry if I'm not clear. If we ignore the grafana part, when I directly query api query range, I have a difference in the response. In the two examples below, the first answers what I expect. The second responds to me with less than 23 hours. Is it normal ? I will test later with prometheus to see if it is the same behavior. Example over 17 daysI ask every day at 23h UTC: # query: test_sensor_energy_kwh default 0
# start: 2023-11-09T23:00:00+00:00
# end: 2023-11-26T22:59:59+00:00
curl -G \
-d 'query=test_sensor_energy_kwh%20default%200' \
-d 'start=1699570800' \
-d 'end=1701039599' \
-d 'step=1d' \
'http://localhost:8428/api/v1/query_range' Answers every day at 23h UTC:
Example over 1 yearAsking to do each day at 23h UTC: # query: test_sensor_energy_kwh default 0
# start: 2022-12-31T23:00:00+00:00
# end: 2023-12-31T22:59:59+00:00
curl -G \
-d 'query=test_sensor_energy_kwh%20default%200' \
-d 'start=1672527600' \
-d 'end=1704063599' \
-d 'step=1d' \
'http://localhost:8428/api/v1/query_range' Answers every day at 0h UTC:
|
I made a very simple comparison with Prometheus. Prometheus gives me the datetimes I expect. Victora Metrics
Prometheus
|
Thanks @flashmouse its better with search cache disabled. |
Is your question request related to a specific component?
Victoria Metrics
Describe the question in detail
I've just started using Victoria Metrics and I love it, but I'm experiencing some strange behavior.
I use it with grafana and I want to have a monthly graph over the year. I am in the "Europe/Paris" time zone and I query a range of the current year with one data per day, then I apply a transformation to get the monthly sum. When I try to do this, I have a timestamp before the requested start and the desired step is not respected, but it works when the range is less important (like 7 days).
For example
start=1672527600
,end=1704063599
,step=1
,query="test_sensor_energy_kwh default 0"
with the following fake metric gives me a timestamp at2022-MM-DD 00:00:00 UTC
instead of2022-MM-DD 23:00:00 UTC
and the first one is out of range at2022-12-31 00:00:00 UTC
:Is this expected behavior or am I missing something?
Troubleshooting docs
The text was updated successfully, but these errors were encountered: