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 the service name as dynatrace-otel-collector even if they are installed in separate VMs. Is it possible to rename the service name to reflect the hostname so we can distinguish the data based on hostnames?

2 REPLIES 2

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

 

kamodgautam
Frequent Guest

I did give that config a shot but it doesn't seem to work.

Featured Posts