prometheus / jmx_exporter

A process for exposing JMX Beans via HTTP for Prometheus consumption
Apache License 2.0
3.03k stars 1.2k forks source link

Make prometheus endpoitn configurable #149

Closed udaraliyanage closed 7 years ago

udaraliyanage commented 7 years ago

Hi,

As I understood prometheus endpoint is hardcoded. Shall we make it configurable?

context.addServlet(new ServletHolder(new MetricsServlet()), "/metrics");

brian-brazil commented 7 years ago

Why do you need to change? It's the only thing on the port, and /metrics is the standard endpoint.

udaraliyanage commented 7 years ago

For instance springboot apps already have /metrics for actuator. There we using /prometheus for prometheus stats. While it is technically still possible to use /metrics since agent runs in a different port, just thought of having /prometheus so anyone understand that this is prometheus output by looking at configuration.

brian-brazil commented 7 years ago

I don't see the confusion here. /metrics is the standard for Prometheus so your argument is basically that Promethus should change its standard everywhere to /prometheus - which isn't going to happen.

I'm not in favour of allowing users to make their setup more complicated and non-standard just in case it might be easier for the odd users to understand what an endpoint means.

mindfulmonk commented 7 years ago

It would be good if it was configurable.

The official exporters like node, consul and mysql already have aweb.telemetry-path