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

Allow the query-frontend code to proxy queries to 'vanilla' Prometheus. #1441

Merged
merged 4 commits into from
Aug 19, 2019

Conversation

tomwilkie
Copy link
Contributor

@tomwilkie tomwilkie commented Jun 3, 2019

This allows us to get all the benefits of the query-frontend (caching, splitting, aligning, retires etc) with OSS Prometheus.

eg

$ ./cortex --config.file=./docs/prometheus-frontend.yml  -frontend.downstream-url=http://localhost:9090

Signed-off-by: Tom Wilkie [email protected]

@tomwilkie tomwilkie marked this pull request as ready for review July 31, 2019 10:17
@tomwilkie tomwilkie requested a review from gouthamve July 31, 2019 10:18
@tomwilkie tomwilkie force-pushed the frontend-for-prometheus branch from c304bc5 to 63baf71 Compare July 31, 2019 10:57
@tomwilkie tomwilkie force-pushed the frontend-for-prometheus branch from 63baf71 to 3085349 Compare August 19, 2019 11:29
- Allow specification of target in config file.
- Allow sepcification of HTTP prefix (/api/prom), so we can drop it to look like a 'normal' prometheus.
- Fix forwarding request to normal Prometheus.

Signed-off-by: Tom Wilkie <[email protected]>
@tomwilkie tomwilkie force-pushed the frontend-for-prometheus branch from 3085349 to 981f128 Compare August 19, 2019 11:58
@@ -99,6 +103,7 @@ func New(cfg Config, log log.Logger, limits *validation.Overrides) (*Frontend, e
log: log,
queues: map[string]chan *request{},
}
f.cond = sync.NewCond(&f.mtx)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a move, used to be at bottom of the function. Prefer it here, but can do in different PR if necessary.

Copy link
Contributor

@gouthamve gouthamve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, short and simple.

@tomwilkie tomwilkie merged commit 0460dad into master Aug 19, 2019
@tomwilkie tomwilkie deleted the frontend-for-prometheus branch August 19, 2019 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants