HTTPServer
The HTTPServer
is a standalone server for exposing a metric endpoint. A minimal example application for HTTPServer
can be found in the examples directory.
HTTPServer server = HTTPServer.builder()
.port(9400)
.buildAndStart();
By default, HTTPServer
binds to any IP address, you can change this with hostname() or inetAddress().
HTTPServer
is configured with three endpoints:
/metrics
for Prometheus scraping./-/healthy
for simple health checks./
the default handler is a static HTML page.
The default handler can be changed with defaultHandler().
- authenticator() is for configuring authentication.
- httpsConfigurator() is for configuring HTTPS.
You can find an example of authentication and SSL in the jmx_exporter.
See config section (todo) on runtime configuration options.
io.prometheus.exporter.httpServer.port
: The port to bind to.