Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use OneAgent Metrics API with Dynatrace Operator




I have installed the operator( and then added metrics-ingest to the dynakube, but now, how can I use the metrics ingestion endpoint ?


I'd like to create custom metrics from my deployments, so from my pods I will call the OneAgent metrics api.


Should I call the ActiveGate service ? Should the http://localhost:14499/metrics/ingest be available on my pods ?


I'm stuck on what do now.


DynaMight Champion
DynaMight Champion

The 14499 port service is located at the node level, not at pod.

Did you tried to point to the node IP instead localhost and test?

Site Reliability Engineer @ Kyndryl

Hi, I'm gonna explain my use case:


I'm gonna use OpentelemetryCollector with dynatraceexporter(


So I need to configure the url when it is not possible to use the default value (localhost:14499)


I'm gonna talk to our devops to test that connection using nodeIp:14499.



I'm testing locally:

kubectl get node -o wide

NAME                               INTERNAL-IP


Then I tried that inside a pod:


curl --data "alef.oneagent,cpu=1 55" \
     -H "Content-Type: text/plain; charset=utf-8"


The response was Connection Refused.


I also tried that curl inside oneagent pod, and it worked!

DynaMight Champion
DynaMight Champion

What about to call the AG using the Ingest Metric Datapoint API?



Site Reliability Engineer @ Kyndryl

I tried to call the SaaS and ActiveGate endpoints, but I needed to send the auth header and add the dynatrace attributes(, dt.entity, etc). manually 😞


Calling the oneagent endpoint all metrics are already tagged with those default attributes.


For example there are receivers on OpenTelemetry Collector( that I cant modify to add those attributes.


So, my first try was to use OneAgent metrics to centralize all metrics ingestion...

DynaMight Champion
DynaMight Champion

Since you are using OTel, did you check for this already?

Site Reliability Engineer @ Kyndryl

Yes, i'm using that "Zero configuration" strategy. But it sends the metrics to http://localhost:14499/metrics/ingest(OneAgent metrics api)


But the pod(otel collector) cant call the localhost:14499, so I was searching for a solution that I could call OneAgent APIs. I was planning to create a sidecard to redirect the http://localhost:14499/metrics/ingest  to a that new endpoint.


But I dont know how to call the OneAgent Metrics api outside the oneagent pod.