Open Q&A
If there's no good subforum for your question - ask it here!
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

is it possible to rename dynatrace otel collector with a windows host name

kamodgautam
Frequent Guest

i have a dynatrace otel collector installed on a windows vm and have enabled otel collector self health check. however in the out of the box otel dashboard i see service name as dynatrace-otel-collector even if they are installed in seperate VMs. it is possible to rename the service name to reflect the host name so we can distinguish the data based on host names?

1 REPLY 1

t_pawlak
Champion

Hi,
You can try updating your otel-collector-config.yaml and add a resource processor to override service.name with the host name:

processors:
  resource:
    attributes:
      - key: service.name
        from_attribute: host.name
        action: upsert

Make sure the processor is used in the pipeline:

service:
  pipelines:
    metrics:
      receivers: [otlp]
      processors: [resource]
      exporters: [otlphttp]


Alternatively, you can set the service name manually per VM, for example:

processors:
  resource:
    attributes:
      - key: service.name
        value: dynatrace-otel-collector-${HOSTNAME}
        action: upsert

 

Featured Posts