{"repo":"mirage/prometheus","free":true,"listed":false,"github":"https://github.com/mirage/prometheus","clone":"git clone https://github.com/mirage/prometheus.git","description":"OCaml library for reporting metrics to a Prometheus server","language":"OCaml","stars":53,"topics":["metrics","mirageos","ocaml"],"license":"Apache-2.0","category":"analytics","readme_excerpt":"OCaml client library for Prometheus monitoring To run services reliably, it is useful if they can report various metrics (for example, heap size, queue lengths, number of warnings logged, etc). A monitoring service can be configured to collect this data regularly. The data can be graphed to help understand the performance of the service over time, or to help debug problems quickly. It can also be used to send alerts if a service is down or behaving poorly. This repository contains code to report metrics to a [Prometheus][] monitoring server. Use by libraries Library authors should define a set of metrics that may be useful. For example, the DataKitCI cache module defines several metrics like this: Each of these metrics has a name label, which allows the reports to be further broken down by the type of thing being built. When (for example) a build succeeds, the CI does: Use by applications 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: Unikernels can use Prometheus app instead of Prometheus unix to avoid the Unix dependency. The prometheus-reporter opam package provides the parts of prometheus-app that do not depend on cohttp. Prometheus reporter renders a r","default_branch":null,"files":null,"tree":[],"storefront":"/r/mirage","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mirage/prometheus/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}