Module Prometheus_unixSource

Report metrics for Prometheus.

See: https://prometheus.io/

Notes:

Report metrics for messages logged. See Prometheus_reporter_unix.Logging.

Sourcemodule Listen_address : sig ... end
Sourcetype config
Sourceval config : ?listen_address:Listen_address.t -> unit -> config

config ~listen_address () serves metrics on listen_address.

Sourceval serve : ?registry:Prometheus_lwt.CollectorRegistry.t -> config -> unit Lwt.t list

serve config starts a Cohttp server according to config. It returns a singleton list containing the thread to monitor, or an empty list if no server is configured. The socket is bound before the thread is returned.

opts is the extra command-line options to offer Prometheus monitoring. It rejects addresses that Listen_address cannot parse.