-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Docs: Add multi-tenant query curl examples #6530
Docs: Add multi-tenant query curl examples #6530
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some thoughts.
docs/sources/api/_index.md
Outdated
@@ -209,37 +217,37 @@ $ curl -G -s "http://localhost:3100/loki/api/v1/query" --data-urlencode 'query= | |||
} | |||
} | |||
``` | |||
Set the `x-scope-orgid` header, | |||
as defined in [Grafana Loki Multi-Tenancy](../operations/multi-tenancy/), | |||
to query specific tenants. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to query specific tenants. | |
to specify to Loki which specific tenant you want to query. |
docs/sources/api/_index.md
Outdated
--data-urlencode \ | ||
'query=sum(rate({job="varlogs"}[10m])) by (level)' | jq | ||
``` | ||
The same Grafana Enterprise Logs example query against the three tenants |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same Grafana Enterprise Logs example query against the three tenants | |
The same Grafana Enterprise Logs example query against the three tenants requires the use of Basic Authentication. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This documentation is for Loki OSS right? Do we reference GEL there? I don't know the process well enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, @jeschkies. In the short term, we're including a GEL example in the Loki docs, so folks know that it is different for GEL. Our GEL readers have to find their info on this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. This looks good to me 🙂
docs/sources/api/_index.md
Outdated
specify the tenant names separated by the pipe (`|`) character: | ||
|
||
```bash | ||
curl -H 'x-scope-orgid:Tenant1|Tenant2|Tenant3' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curl -H 'x-scope-orgid:Tenant1|Tenant2|Tenant3' \ | |
curl -H 'X-Scope-OrgID: Tenant1|Tenant2|Tenant3' \ |
docs/sources/api/_index.md
Outdated
--data-urlencode \ | ||
'query=sum(rate({job="varlogs"}[10m])) by (level)' | jq | ||
``` | ||
The same Grafana Enterprise Logs example query against the three tenants |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This documentation is for Loki OSS right? Do we reference GEL there? I don't know the process well enough.
./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell. + ingester 0%
+ distributor 0%
+ querier 0%
+ querier/queryrange 0.1%
+ iter 0%
+ storage 0%
+ chunkenc 0%
+ logql 0%
- loki -0.6% |
./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell. + ingester 0%
+ distributor 0%
+ querier 0%
+ querier/queryrange 0%
+ iter 0%
+ storage 0%
+ chunkenc 0%
+ logql 0%
+ loki 0% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit but approving to unblock! LGTM!
@@ -210,36 +218,39 @@ $ curl -G -s "http://localhost:3100/loki/api/v1/query" --data-urlencode 'query= | |||
} | |||
``` | |||
|
|||
If your cluster has | |||
[Grafana Loki Multi-Tenancy](../operations/multi-tenancy/) enabled, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Grafana Loki Multi-Tenancy](../operations/multi-tenancy/) enabled, | |
[multi-tenancy](../operations/multi-tenancy/) enabled, |
Feels weird to say 'Grafana Loki Multi-Tenancy' - makes it feel like its some sort of trademarked thing when multi-tenant software is sort of a general and widespread concept.
You could change it to If your Grafana Loki cluster has multi tenancy enabled should you so choose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does feel stilted and weird. However, a style guideline is to make the link name the same as the web page title or subsection title that we're sending someone to. It helps readers know that they've landed at the link we intended for them. That web page is titled "Grafana Loki Multi-tenancy," so I used it as the link title.
I'm going to leave this for now, but happy to figure out a future change that rewords and still follows the style guideline.
* Docs: Add multi-tenant query curl examples * Revise per review suggestions. (cherry picked from commit 92aa69b)
This PR expands the curl examples given for the query API endpoint to include specifying a single tenant, multiple tenants, and gives the equivalent curl example, but for a GEL cluster.
Reviewers: