Skip to content
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

Invalid startDate is passed #528

Closed
dupondje opened this issue Dec 21, 2022 · 1 comment
Closed

Invalid startDate is passed #528

dupondje opened this issue Dec 21, 2022 · 1 comment
Labels

Comments

@dupondje
Copy link

dupondje commented Dec 21, 2022

We started using Promxy to aggregate metrics from Thanos and VictoriaMetrics.
This works fine, except that we have issues with /series call's without a start/end timestamp included.

DEBU[2022-12-21T13:25:04+01:00] http://xxx:8428                        api=Series endTime="292277025-08-18 07:12:54.999 +0000 UTC" matches="[{tag=\"Y1\",__name__=\"system_uptime\"}]" startTime="-292273086-05-16 16:47:06 +0000 UTC"
DEBU[2022-12-21T13:25:04+01:00] http://xxx:10912                       api=Series endTime="292277025-08-18 07:12:54.999 +0000 UTC" matches="[{tag=\"Y1\",__name__=\"system_uptime\"}]" startTime="-292273086-05-16 16:47:06 +0000 UTC" took="299.112µs"
DEBU[2022-12-21T13:25:04+01:00] http://xxx:8428                        api=Series endTime="292277025-08-18 07:12:54.999 +0000 UTC" matches="[{tag=\"Y1\",__name__=\"system_uptime\"}]" startTime="-292273086-05-16 16:47:06 +0000 UTC" took=4.870023ms
DEBU[2022-12-21T13:25:04+01:00] Select                                        matchers="[tag=\"Y1\" __name__=\"system_uptime\"]" selectHints="&{-9223309901257974000 9223309901257974999 0 series [] false 0}" took=5.035425ms
XXXXX - - [21/Dec/2022 12:25:04] "POST /api/v1/series HTTP/1.1 200 30" 0.005280 match%5B%5D=system_uptime%7Btag%3D%22Y1%22%7D

As you see it passes startTime="-292273086-05-16 16:47:06 +0000 UTC" to the backend, which seems to be unable to parse this and returns no results.
When passing start=1 (0 doesn't work neither) to the /series call, then you get results. But without specifying a start value, it returns an emply resultset.

@jacksontj
Copy link
Owner

Unfortunately this is an upstream client_golang bug (prometheus/client_golang#621) -- TLDR the client requires a time.Time and will format it regardless of the value. I had proposed a fix upstream but that seemed to stall out. So unfortunately until that is fixed upstream there is little to do here (short of forking that client).

@jacksontj jacksontj added the bug label Feb 14, 2023
jacksontj added a commit that referenced this issue Mar 22, 2023
This will (with the new upstream client change) not send the start/end
to the downstream API

Fixes #528
jacksontj added a commit that referenced this issue Mar 22, 2023
This will (with the new upstream client change) not send the start/end
to the downstream API

Fixes #528
jacksontj added a commit that referenced this issue Mar 22, 2023
This will (with the new upstream client change) not send the start/end
to the downstream API

Fixes #528
jacksontj added a commit that referenced this issue Mar 22, 2023
This will (with the new upstream client change) not send the start/end
to the downstream API

Fixes #528
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants