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

Ruler: Add authentication options query #1778

Closed
diemus opened this issue Nov 22, 2019 · 4 comments · Fixed by #1939
Closed

Ruler: Add authentication options query #1778

diemus opened this issue Nov 22, 2019 · 4 comments · Fixed by #1939

Comments

@diemus
Copy link

diemus commented Nov 22, 2019

version:0.8.1

    http://user:password@xxxx.com/api/v1/query?dedup=true&partial_response=false&query=probe_failed_due_to_http_status_code+%21%3D+0&time=2019-11-22T14%3A37%3A10.387097931%2B08%3A00
    level=error ts=2019-11-22T06:37:10.53514552Z caller=rule.go:775 err="unmarshal query instant response: invalid character '<' looking for beginning of value" 

I copy the url to postman and it returns a json result. it seems the ruler can not perform a basic auth request

@bwplotka bwplotka changed the title ruler module does not support basic auth for --query Ruler: Add authentication options query Nov 27, 2019
@bwplotka
Copy link
Member

bwplotka commented Nov 27, 2019

Yup, let's get back to this. It would be nice to add authentication options similar as we plan to do against Alermanager #606

It would really nice to have it composed as a query.config<-files> instead of query.file-sd FileSD we have in Thanos, similar to the Prometheus scrape config:

       // A set of query parameters with which the target is scraped.
       Params url.Values `yaml:"params,omitempty"`
       // The HTTP resource path on with Query API endpoint.
       Path string `yaml:"path,omitempty"`
       // The URL scheme with which to fetch metrics from targets.
       Scheme string `yaml:"scheme,omitempty"`
       // List of addresses with dns prefixes.
       StaticAddresses []string `yaml:"file_sd_configs,omitempty"`
       // List of file  configurations (our FileSD supports different dns lookup)
       FileSDConfigs []*file.SDConfig `yaml:"file_sd_configs,omitempty"`
       HTTPClientConfig       config_util.HTTPClientConfig     `yaml:",inline"`

cc @simonpasquier

@daixiang0
Copy link
Member

@bwplotka does anyone take this?

@simonpasquier
Copy link
Contributor

@daixiang0 I'll send a PR today

@daixiang0
Copy link
Member

@simonpasquier cool

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

Successfully merging a pull request may close this issue.

4 participants