-
Notifications
You must be signed in to change notification settings - Fork 2.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
[sync part3] promclient: Added method for Prometheus snapshot. #730
Conversation
75a13c3
to
0e0b864
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good ... I expect these will be used in next PR ;)
Only thing I would ask is to update the nits in around the error messages.
} | ||
resp, err := http.DefaultClient.Do(req.WithContext(ctx)) | ||
if err != nil { | ||
return Flags{}, errors.Wrapf(err, "request config against %s", u.String()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config
> flags
0e0b864
to
bbd0b52
Compare
bbd0b52
to
a8391db
Compare
a8391db
to
8abd8d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢 nice ... looking forward to seeing this in action.
u := *base | ||
u.Path = path.Join(u.Path, "/api/v1/admin/tsdb/snapshot") | ||
|
||
req, err := http.NewRequest( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be worth to check the ConfiguredFlags
for the web.enable-admin-api?
If called more times it would cause overhead but on the other hand the check will provide always relevant hint what is the issue.
Or maybe just checking for 404 status on the napshot API url would be enough to give that hint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm do you mean to use Configured Flags to check admin api flag e.g to tell if we can use snapshotting or not?
That is the plan, just not on this PR (:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that's exactly what I had in mind. Ok :)
ef254d1
to
02b0186
Compare
9dce393
to
737cf23
Compare
Also: * Resigned from tests against 2.0.0 version as in README. * Added foreach Prometheus version testutil. Signed-off-by: Bartek Plotka <[email protected]>
737cf23
to
e15f983
Compare
Required for #731
Important follow up on this is #758
Signed-off-by: Bartek Plotka [email protected]