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

/api/v1/query requires time #1460

Closed
AlekSi opened this Issue Mar 4, 2016 · 4 comments

Comments

Projects
None yet
4 participants
@AlekSi
Copy link
Contributor

AlekSi commented Mar 4, 2016

http://prometheus.io/docs/querying/api/#instant-queries says

The current server time is used if the time parameter is omitted.

However, it is in fact required: {"status":"error","errorType":"bad_data","error":"cannot parse \"\" to a valid timestamp"}

https://github.com/prometheus/prometheus/blob/master/web/api/v1/api.go#L311 – no check for absent query argument.

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Mar 4, 2016

Which version are you running?

The defaulting to now is a bit further up before entering the parsing function: https://github.com/prometheus/prometheus/blob/master/web/api/v1/api.go#L132-L140

@grobie

This comment has been minimized.

Copy link
Member

grobie commented Mar 8, 2016

Please re-open if you have more questions.

@grobie grobie closed this Mar 8, 2016

@AlekSi

This comment has been minimized.

Copy link
Contributor Author

AlekSi commented Mar 9, 2016

Sorry, you are right, I used 0.16.1, where time is mandatory argument. Thanks.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.