Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 1.92 KB

File metadata and controls

43 lines (31 loc) · 1.92 KB
title HTTPServer
weight 4

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().

Authentication and HTTPS

You can find an example of authentication and SSL in the jmx_exporter.

Properties

See config section (todo) on runtime configuration options.

  • io.prometheus.exporter.http_server.port: The port to bind to.