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

How to connect with mimir ? #158

Open
pingping95 opened this issue Oct 13, 2023 · 11 comments
Open

How to connect with mimir ? #158

pingping95 opened this issue Oct 13, 2023 · 11 comments

Comments

@pingping95
Copy link

Is your feature request related to a problem? Please describe.

krr simple -p https://mimir.xxxxx.xxx --prometheus-label cluster -l my-cluster

I tried above command and does not success.

image

Describe the solution you'd like
Hope to support Mimir

If i did wrong command, please let me know the exact command.

@KelvinVenancio
Copy link

I am looking forward to being able to use it with Mimir too.

@FrankFoerster24
Copy link
Contributor

Hi,

this works for me:

krr simple --prometheus-url "http://localhost:8080/prometheus"

This is a Mimir deployment using the mimir-distributed-4.4.1 helm chart, :8080 is a port forward to its Nginx service (or rather a pod behind it), the /prometheus route should hit Mimir's query frontend. So any URL that hits this service should work, I just happened to use port forwarding. Note that it is a bit sensitive to trailing slashes, eg. I noticed http://localhost:8080/prometheus/ does not work for me. Good luck.

Kind regards,
Frank.

@KelvinVenancio
Copy link

Hi @FrankFoerster24, perfect, it works like a charm, thank you for sharing with us.

@aantn
Copy link
Contributor

aantn commented Nov 6, 2023

Thanks for the update.

If anyone would like to contribute a PR to fix the docs (or autodiscovery, or that issue with trailing slashes) that would be more than welcome! And we'll send you a cool Robusta t-shirt in appreciation :)

@FrankFoerster24
Copy link
Contributor

As a starting point, I hacked something in #168 which works for my installation. Some things are not at the right place yet, though.

@nantiferov
Copy link

I can add to aforementioned example that current version of krr (v1.6.0) works without issues with self-hosted Mimir.

Only headers for tenant-id should be provided too (were added in #84), example

$ krr simple --prometheus-url https://mimir.some.domain/prometheus --prometheus-headers 'X-Scope-OrgID: some-tenant-id'

@aantn
Copy link
Contributor

aantn commented Jan 12, 2024

@pavangudiwada could you assist with updating the docs re. @FrankFoerster24's and @nantiferov's instructions?

@pingping95
Copy link
Author

Hi all.

I think cluster-label config need to add for those who have lots cluster label values for multi cluster.

krr simple --prometheus-url https://mimir.xxxxx.xxx/prometheus --prometheus-headers 'X-Scope-OrgID: anonymous' --prometheus-label cluster -l cluster-label-value
1. run kubectx
kubectx cluster-to-watch

2. run krr
krr simple --prometheus-url https://mimir.xxxxx.xxx/prometheus --prometheus-headers 'X-Scope-OrgID: anonymous' --prometheus-label cluster -l cluster-to-watch
image

@aantn
Copy link
Contributor

aantn commented Jan 14, 2024

To clarify, you have multiple clusters under the same Mimir tenant ID, right?

@pingping95
Copy link
Author

@aantn yes.

I have multiple clusters under same mimir tenant ID.

So i changed my cluster context and then run krr command.

it works for my case.

@aantn
Copy link
Contributor

aantn commented Jan 14, 2024

Thanks, we'll add something to the docs.

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

No branches or pull requests

5 participants