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

Grafana not support multi-tenant for Victorialogs #85

Closed
nulldoot2k opened this issue Oct 11, 2024 · 9 comments
Closed

Grafana not support multi-tenant for Victorialogs #85

nulldoot2k opened this issue Oct 11, 2024 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@nulldoot2k
Copy link

Hi, Team!
I am currently deploying Victorialogs based on single version with replicas=2

image

Previously my vmauth defined the noauth route via 2 tenant=1:1000 and tenant=1:1001

tenant=1:1000
image
tenant=1:1000 2
image

Basically I see everything is healthy.
But there is a problem as follows

As I see Victorialogs already supports multiple tenants with closed article: VictoriaMetrics/VictoriaMetrics#3792
But checking shows that on Grafana it is not possible to add that, because the outgoing route does not support that yet
Look at the path: http://vmauth:8247/select/vmui
with Tenant: "1:1000"

I think we need change path from /select/vmui/ to /select/1:1000/vmui/
Like that

image

Outside solution using vmauth for users - tenant
Is there any solution for using auth in prefix_path ?

Thanks a lot!!!

@dmitryk-dk
Copy link
Contributor

Hi @nulldoot2k ! The issue you mentioned in the description was implemented for the VictoriaMetrics. If you want to get logs via tenant you should use headers as described in the documentation

By default the (AccountID=0, ProjectID=0) tenant is queried. If you need querying other tenant, then specify it via AccountID and ProjectID http request headers. For example, the following query searches for log messages at (AccountID=12, ProjectID=34) tenant:

curl http://localhost:9428/select/logsql/query -H 'AccountID: 12' -H 'ProjectID: 34' -d 'query=error'

So my question is, do you need a selector where you can select the tenant from which you want to query data?

@dmitryk-dk dmitryk-dk self-assigned this Oct 16, 2024
@nulldoot2k
Copy link
Author

@dmitryk-dk Hi bro, I added Header on my grafana datasource

image

But it's not work, because it's default tenant 0:0
Seem grafana datasource not reference -H 'AccountID: 1' -H 'ProjectID: 1000'

@hagen1778 hagen1778 added the enhancement New feature or request label Oct 24, 2024
@nulldoot2k
Copy link
Author

Thanks for the quick reply. @hagen1778 how long will it take to add this func?

@hagen1778
Copy link
Contributor

Hey @dmitryk-dk could you please verify that headers are correctly forwarded by the datasource?

@dmitryk-dk
Copy link
Contributor

Hey @dmitryk-dk could you please verify that headers are correctly forwarded by the datasource?

Yeah, will check it soon! If we need some other logic for this feature, we will implement it :)

@nulldoot2k
Copy link
Author

nulldoot2k commented Dec 19, 2024

Forward: #158
That cool, when it gets soon update :)
But i want ask, As an administrator, I think pointing to Grafana is not a good choice for Dev.
Add a solution combining vmauth + victorialogs for endpoint
HTTP:

image

@dmitryk-dk
Copy link
Contributor

Forward: #158 That cool, when it gets soon update :) But i want ask, As an administrator, I think pointing to Grafana is not a good choice for Dev. Add a solution combining vmauth + victorialogs for endpoint HTTP:

image

We will add support for the headers soon. Maybe next week

@dmitryk-dk
Copy link
Contributor

Hi @nulldoot2k ! We released the new version of the plugin where we implemented support of the custom headers.
Can try to use this release?

@nulldoot2k
Copy link
Author

Hi @nulldoot2k ! We released the new version of the plugin where we implemented support of the custom headers. Can try to use this release?

Of course, i'll apply them in our pre-release.
Thank you very much <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants