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

Add obsctl metrics ui command #43

Merged
merged 2 commits into from
Aug 24, 2022
Merged

Conversation

saswatamcode
Copy link
Member

@saswatamcode saswatamcode commented Aug 22, 2022

This PR adds a new command obsctl metrics ui, which starts up a proxy server using current "context".

The proxy server runs on localhost:8080 by default and proxies requests to the current "context" Observatorium API. And it prefixes /api/metrics/v1 path for each request it proxies. This ensures that Thanos Query UI is able to load all the information it needs to display by making requests to localhost.

Server is shutdown when a cancellation signal is received.

This can also be extended to other resource types like logs and traces later on!

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

💪🏽

var err error
switch runtime.GOOS {
case "windows":
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Run()
Copy link
Member

Choose a reason for hiding this comment

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

That's some mastership in hackery 🙈

Copy link
Member Author

Choose a reason for hiding this comment

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

Signed-off-by: Saswata Mukherjee <[email protected]>
Signed-off-by: Saswata Mukherjee <[email protected]>
Copy link
Contributor

@matej-g matej-g left a comment

Choose a reason for hiding this comment

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

💯

@matej-g matej-g merged commit ac8997f into observatorium:main Aug 24, 2022
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.

3 participants