package prometheus-app

  1. Overview
  2. Docs
Client library for Prometheus monitoring

Install

dune-project
 Dependency

Authors

Maintainers

Sources

prometheus-2.0.tbz
sha256=94cb5e95606d5ff17b4d11801ead1ea1981c06b17b084950d7a032933d991a83
sha512=236cc53cc50e24e18e31bf58dd29e9b98b50da0a92f7077d37ff13088c2b31eee49ed4eced8322f67406b0e4216c4751685002d357d9056335f7fc3e618c7f13

doc/prometheus-app.unix/Prometheus_unix/index.html

Module Prometheus_unixSource

Report metrics for Prometheus.

See: https://prometheus.io/

Notes:

  • This module is intended to be used by applications that export Prometheus metrics. Libraries should only link against the `Prometheus` module.
  • This module automatically initialises itself and registers some standard collectors relating to GC statistics, as recommended by Prometheus.
  • This extends Prometheus_reporter_unix with support for cmdliner option parsing and a server pre-configured for Unix.

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.