prometheus-appversion Documentation on ocaml.org

Client library for Prometheus monitoring

Applications can enable metric reporting using the prometheus-app opam package. This depends on cohttp and can serve the metrics collected above over HTTP.

The prometheus-app.unix ocamlfind library provides the Prometheus_unix module, which includes a cmdliner option and pre-configured web-server. See the examples/example.ml program for an example, which can be run as:

$ dune exec -- examples/example.exe --listen-prometheus=9090
If run with the option --listen-prometheus=9090, this program serves metrics at
http://localhost:9090/metrics
Tick!
Tick!
...

--listen-prometheus takes a bare port number or an address such as tcp:127.0.0.1:9090, tcp:[::1]:9090, tcp:localhost or unix:/run/metrics.sock. The port defaults to 9090.

Unikernels can use prometheus-reporter instead to avoid the Unix and cohttp dependencies.

AuthorsThomas Leonard and David Scott
LicenseApache-2.0
Published
Homepagehttps://github.com/mirage/prometheus
Issue Trackerhttps://github.com/mirage/prometheus/issues
Documentationhttps://mirage.github.io/prometheus/
Maintainertalex5@gmail.com
Dependencies
Source [http] https://github.com/mirage/prometheus/releases/download/v2.0/prometheus-2.0.tbz
sha256=94cb5e95606d5ff17b4d11801ead1ea1981c06b17b084950d7a032933d991a83
sha512=236cc53cc50e24e18e31bf58dd29e9b98b50da0a92f7077d37ff13088c2b31eee49ed4eced8322f67406b0e4216c4751685002d357d9056335f7fc3e618c7f13
Edithttps://github.com/ocaml/opam-repository/tree/master/packages/prometheus-app/prometheus-app.2.0/opam
Required by