Default ports for /metrics endpoint when instrumenting modules?

9 views
Skip to first unread message

John Dexter

unread,
Sep 28, 2020, 10:30:09 AM9/28/20
to promethe...@googlegroups.com
The prometheus docs has a nice page listing ports used in exporters, etc: https://github.com/prometheus/prometheus/wiki/Default-port-allocations

But I couldn't see a guide if there is a typical port range advised for instrumenting my own modules. Is there any sort of best practice or at least common practice on this, to avoid clashing with Prometheus and other obvious things? Each instrumented module must need its own port so in a large system this could be quite a few ports we need to open, and it would be nice to have a contiguous block for Firewalls etc.

Thanks.

Brian Brazil

unread,
Sep 28, 2020, 11:07:37 AM9/28/20
to John Dexter, Prometheus Users
On Mon, 28 Sep 2020 at 15:30, John Dexter <jo...@jdxsolutions.com> wrote:
The prometheus docs has a nice page listing ports used in exporters, etc: https://github.com/prometheus/prometheus/wiki/Default-port-allocations

But I couldn't see a guide if there is a typical port range advised for instrumenting my own modules. Is there any sort of best practice or at least common practice on this, to avoid clashing with Prometheus and other obvious things? Each instrumented module must need its own port so in a large system this could be quite a few ports we need to open, and it would be nice to have a contiguous block for Firewalls etc.

In general, follow whatever your organisation's usual port allocation policies are. That wiki page started out back in the day when more than one official component defaulted to 8080, and unintentionally grew to what it is today. If you are creating a publicly shared exporter and have no other constraints, getting a default port number from that page is wise for publicising your exporter at least - but it's only a default which you can (almost only) change via flag or config.

--
Reply all
Reply to author
Forward
0 new messages