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

Custom Prometheus metrics into Dynatrace

ranjpurewal
Newcomer

Hi all,

I have an application orchestrated in Docker Swarm. My application containers expose custom Prometheus metrics, which I currently scrape using a Prometheus container and visualize in Grafana.

I'm looking to integrate these metrics into Dynatrace, but I prefer not to send them directly to the public metrics ingestion endpoint. Ideally, I'd like to leverage the Dynatrace OneAgent to collect these metrics.

Could anyone advise on the best approach for achieving this please?

Is it possible for a Dynatrace extension to query my existing Prometheus container and forward the metrics to the OneAgent?

I'm open to other more solutions if available

Thanks in advance

Ranj

5 REPLIES 5

Hi @ranjpurewal ,

kindly check this link for how to integrate with Prometheus and collecting metrics

https://docs.dynatrace.com/docs/shortlink/monitor-prometheus-metrics

BR,
Mostafa Hussein.

 

Certified Dynatrace Professional | Certified Dynatrace Services - Observability | Dynatrace Partner yourcompass.ca

Hi @MostafaHussein 

Thanks for the link, but seems like this is around kubernetes and Pods etc i.e using annotations etc

My application is running as docker services/containers on a docker swarm. With Prometheus also running as a docker container

Is it possible in my setup to export Prometheus metrics to Dynatrace?

Thanks in advance

Ranj

 

 

Hi @ranjpurewal ,

Yes it's possible, I've created 2 basic containers for prometheus with URL localhost:9090 and oneagent, see the following link:
https://docs.dynatrace.com/docs/shortlink/oneagent-docker
 finally I got all my containers is monitored now as the following figure

MostafaHussein_0-1731593774698.png

 

then created basic v2 extension following this guides 

https://docs.dynatrace.com/docs/shortlink/prometheus-manage
https://developer.dynatrace.com/develop/dynatrace-extensions-vscode/getting-started/

once the prometheus extension deployed I started to make a configuration and the prometheus url `localhost:9090` discovered automatically in addition you've the option to choose you want to monitor it locally or remotely, monitor locally is feasible in case you're monitoring your prometheus container with OneAgent as mentioned in the documentation i've mentioned in my first reply

MostafaHussein_2-1731594068388.png

 

MostafaHussein_1-1731593939786.png

in the following figure you can set the local url of your prometheus metrics

MostafaHussein_3-1731594156144.png

Thanks,
Mostafa Hussein.

 

Certified Dynatrace Professional | Certified Dynatrace Services - Observability | Dynatrace Partner yourcompass.ca

Thanks @MostafaHussein 

Will give it a go

let me know when you get it successful!

Certified Dynatrace Professional | Certified Dynatrace Services - Observability | Dynatrace Partner yourcompass.ca

Featured Posts