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

Open
nulldoot2k opened this issue Oct 11, 2024 · 5 comments
Open

Grafana not support multi-tenant for Victorialogs #85

nulldoot2k opened this issue Oct 11, 2024 · 5 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 :)

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