Skip to content

Latest commit

 

History

History
92 lines (56 loc) · 1.77 KB

prometheus_httpd.md

File metadata and controls

92 lines (56 loc) · 1.77 KB

Module prometheus_httpd

Exports Prometheus metrics via configurable endpoint.

Behaviours: application, supervisor.

Description

Existing httpd:

  {modules, [
     ...
     prometheus_httpd
     ...
  ]},

Built-in httpd instance:

    prometheus_httpd:start()

Telemetry metrics

  • telemetry_scrape_duration_seconds
  • telemetry_scrape_size_bytes
  • telemetry_scrape_encoded_size_bytes

Configuration

Can be configured via prometheus_http key of prometheus app env.
Default configuration:

  {prometheus, [
    ...
    {prometheus_http, [{path, "/metrics"},
                       {format, auto},
                       {port, 8081}]},
    ...
    ]}

Function Index

init/1
start/0 Starts inets httpd server with promtheus_httpd module enabled.
start/2
stop/1

Function Details

init/1

init(X1) -> any()

start/0

start() -> any()

Starts inets httpd server with promtheus_httpd module enabled. Also calls prometheus_http_impl:setup/0.

start/2

start(X1, X2) -> any()

stop/1

stop(X1) -> any()