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

Different authorization for different targets, via relabel #6493

Open
lapo-luchini opened this issue Jun 15, 2024 · 1 comment
Open

Different authorization for different targets, via relabel #6493

lapo-luchini opened this issue Jun 15, 2024 · 1 comment
Labels
enhancement New feature or request vmagent

Comments

@lapo-luchini
Copy link
Contributor

lapo-luchini commented Jun 15, 2024

Is your feature request related to a problem? Please describe

It wold be nice to allow overriding ahtorization (in my case "bearer", but maybe in general) on a per-target basis instead of forcing that only at the job level, as it is cumbersome to have whole different jobs with different names for identical jobs with different targets.

- job_name: syncthing
  authorization:
    type: Bearer
    credentials: bearer1
  static_configs: 
  - targets:
    - host1:8384

- job_name: syncthing_2
  authorization:
    type: Bearer
    credentials: bearer2
  static_configs: 
  - targets:
    - host2:8384
    labels:
      job: syncthing

Describe the solution you'd like

- job_name: syncthing
  authorization:
    type: Bearer
  static_configs: 
  - targets:
    - host1:8384
    labels:
      __authorization_bearer__: bearer1
  - targets:
    - host2:8384
    labels:
      __authorization_bearer__: bearer2

Describe alternatives you've considered

No response

Additional information

I guess support should be added around here.

@lapo-luchini lapo-luchini added the enhancement New feature or request label Jun 15, 2024
@fengxsong
Copy link

It would be nice if we could add some http headers via relabeling while scraping targets:)

@jiekun jiekun added the vmagent label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vmagent
Projects
None yet
Development

No branches or pull requests

3 participants