Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

promtail: Support set tenant id from labels#6290

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
slim-bean merged 1 commit intografana:mainfromjkroepke:tenant-value
Jun 3, 2022
Merged

promtail: Support set tenant id from labels#6290

slim-bean merged 1 commit intografana:mainfromjkroepke:tenant-value
Jun 3, 2022

Conversation

jkroepke
Copy link
Contributor

@jkroepkejkroepke commentedJun 2, 2022
edited
Loading

What this PR does / why we need it:
Currently, it's not possible to set the tenant id based from label gathered by kubernetes_sd_configs. Configs like

scrape_configs:  -job_name:kubernetes-pods-namekubernetes_sd_configs:      -role:podrelabel_configs:      -action:replacesource_labels:          -__meta_kubernetes_namespacetarget_label:namespacepipeline_stages:    -match:selector:'{namespace=".+"}'stages:          -tenant:source:"namespace"

won't work here.

This PR introduce a new option for the tenant stage to use the label map as source.

Since the tenant stage only sets an internal label, I tried to use

relabel_configs:      -action:replacesource_labels:          -__meta_kubernetes_namespacetarget_label:__tenant_id__

but it does not work, because all labels with __ are dropped by promtail.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Checklist

  • Documentation added
  • Tests updated
  • Is this an important fix or new feature? Add an entry in theCHANGELOG.md.
  • Changes that require user attention or interaction to upgrade are documented indocs/sources/upgrading/_index.md

Related to#259#701

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
@CLAassistant
Copy link

CLAassistant commentedJun 2, 2022
edited
Loading

CLA assistant check
All committers have signed the CLA.

@grafanabot
Copy link
Contributor

./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.

+           ingester0%+        distributor0%+            querier0%+ querier/queryrange0%+               iter0%+            storage0%+           chunkenc0%+              logql0%+               loki0%

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign ourContributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let usrecheck it.

@grafanabot
Copy link
Contributor

./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.

+           ingester0%+        distributor0.3%+            querier0%+ querier/queryrange0%+               iter0%+            storage0%+           chunkenc0%+              logql0%+               loki0%

Copy link
Collaborator

@slim-beanslim-bean left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for this!

@slim-beanslim-bean merged commita1e0298 intografana:mainJun 3, 2022
@jkroepkejkroepke deleted the tenant-value branchJune 3, 2022 15:41
@osg-grafanaosg-grafana added type/docsIssues related to technical documentation; the Docs Squad uses this label across many repositories and removed area/docs labelsOct 19, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@slim-beanslim-beanslim-bean approved these changes

@KMiller-GrafanaKMiller-GrafanaAwaiting requested review from KMiller-Grafana

Assignees

No one assigned

Labels

size/Ltype/docsIssues related to technical documentation; the Docs Squad uses this label across many repositories

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@jkroepke@CLAassistant@grafanabot@slim-bean@osg-grafana

[8]ページ先頭

©2009-2025 Movatter.jp