How to integrate fly.io 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 fly.io 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.

Hi,

The Fly.io global Prometheus service can only scrape Fly.io-hosted 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 Fly.io app scraping your external source, then have the Fly.io Prometheus scrape that - there are some parameters in federation that cannot be configured in the Fly.io Prometheus though - but you can instead set it up the other way. Have your Prometheus scrape the Fly.io Prometheus’s federate endpoint, and then your Prometheus can aggregate both the Fly.io-provided 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 Fly.io 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 fly.io metrics here Metrics on Fly.io · 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.