-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expose prometheus metrics #99
Comments
Why does |
I'm looking for a nice place to put this code: let module Server = Prometheus_app.Cohttp(Cohttp_lwt_unix.Server) in
let mode = `TCP (`Port 9090) in (* FIXME: Unix socket *)
let callback = Server.callback in
let server = Cohttp_lwt_unix.Server.make ~callback () in
Lwt.async (fun () -> Cohttp_lwt_unix.Server.create ~mode server); My particular use-case is a bit funny because the main application ( Maybe I should think of the OCaml shim as being more like a (Partly I wanted to create an issue somewhere with a screenshot that I can point people at since I think it looks quite nice!) |
Yes, makes sense to keep this out of the API I think. |
The qcow library gathers a set of metrics in prometheus format including - read, write, discard rate - bytes used, file size - bytes erased, deallocated and in various GC states It's useful to be able to expose these for monitoring, see for example the Grafana dashboard here: mirage/ocaml-qcow#99 This patch adds an optional qcow-stats-config= argument which supports values - unix:/path/to/socket -- listen on a Unix domain socket - tcp:port -- listen on 0.0.0.0:port (unfortunately the Mirage conduit library doesn't allow the bind address to be customised, so care must be taken with the tcp: option) By default nothing is exposed. Signed-off-by: David Scott <[email protected]>
The qcow library gathers a set of metrics in prometheus format including - read, write, discard rate - bytes used, file size - bytes erased, deallocated and in various GC states It's useful to be able to expose these for monitoring, see for example the Grafana dashboard here: mirage/ocaml-qcow#99 This patch adds an optional qcow-stats-config= argument which supports values - unix:/path/to/socket -- listen on a Unix domain socket - tcp:port -- listen on 0.0.0.0:port (unfortunately the Mirage conduit library doesn't allow the bind address to be customised, so care must be taken with the tcp: option) By default nothing is exposed. Signed-off-by: David Scott <[email protected]>
The qcow library gathers a set of metrics in prometheus format including - read, write, discard rate - bytes used, file size - bytes erased, deallocated and in various GC states It's useful to be able to expose these for monitoring, see for example the Grafana dashboard here: mirage/ocaml-qcow#99 This patch adds an optional qcow-stats-config= argument which supports values - unix:/path/to/socket -- listen on a Unix domain socket - tcp:port -- listen on 0.0.0.0:port (unfortunately the Mirage conduit library doesn't allow the bind address to be customised, so care must be taken with the tcp: option) By default nothing is exposed. Signed-off-by: David Scott <[email protected]>
This looks indeed very nice :-) |
The qcow library gathers a set of metrics in prometheus format including - read, write, discard rate - bytes used, file size - bytes erased, deallocated and in various GC states It's useful to be able to expose these for monitoring, see for example the Grafana dashboard here: mirage/ocaml-qcow#99 This patch adds an optional qcow-stats-config= argument which supports values - unix:/path/to/socket -- listen on a Unix domain socket - tcp:port -- listen on 0.0.0.0:port (unfortunately the Mirage conduit library doesn't allow the bind address to be customised, so care must be taken with the tcp: option) By default nothing is exposed. Signed-off-by: David Scott <[email protected]>
This describes how to turn the metrics on, how to scrape them and how to render them into a dashboard. Fixes mirage#99 Signed-off-by: David Scott <[email protected]>
Now that metrics have been defined for things like
It would be nice to be able to easily expose the metrics via the
connect
API. For example, if the metrics are scraped by prometheus and graphed by grafana:The text was updated successfully, but these errors were encountered: