Skip to content

Added param common_labels #302

@sias32

Description

@sias32

Is your feature request related to a problem? Please describe.

I'm using the service discovery option to get a list of targets, there are problems with that.:

  • There is no way to specify common labels that would apply to all targets
  • An additional target system:0 is always created, which cannot be configured in any way

Describe the solution you'd like

I would like to have the common_labels option, in which you can specify parameters for all targets:

common_labels:
- name: instance
  value: server_name

I would like to be able to completely disable the target system:0 or be able to configure its target_labels:

system_target: false

# or

services:
  custom_name:
    service_type: system
    target_labels:
    - name: instance
      value: server_name

Describe alternatives you've considered

So far I have to use relabel_configs to work with labels:

job_name: pgscv
  ...
  relabel_configs:
  - source_labels: [ __address__ ]
    regex: .*target=system:0
    target_label: instance
    replacement: service_system
  - target_label: exporter
    replacement: pgscv

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions