How to integrate managed prometheus to scrape metrics from external source.

Let’s assume I have a metrics endpoint https://test.metricsource/metrics available. I want metrics from this endpoint to be scraped by managed prometheus. How can I achieve this?

I am a newbie and saw that we can create an app in the that app’s fly.toml, create an entry for metrics. But not sure about the exact steps. Please help.


The global Prometheus service can only scrape apps.

If you want to scrape an external source I think you’d have to set up federation. It might be possible to set up a Prometheus server as a app scraping your external source, then have the Prometheus scrape that - there are some parameters in federation that cannot be configured in the Prometheus though - but you can instead set it up the other way. Have your Prometheus scrape the Prometheus’s federate endpoint, and then your Prometheus can aggregate both the metrics and your external sources as desired.

Let me know if these are useful!

  • Daniel

Hi @roadmr ,

Can you specify how we can get the Prometheus federate endpoint, So that we can use it to scrape its metrics in our setup Prometheus.

Hi @suyash1610

You can find information on querying the metrics here Metrics on · Fly Docs

From How To to Questions / Help

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.