From a07ff36396dd5ad8580e504134e38a6ee0797908 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sun, 16 Oct 2022 13:14:33 +0200 Subject: simple prometheus metrics --- README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index ef4764d..d5c9139 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,24 @@ in e.g. passenger information systems. Timetables are read in via GTFS. ## Server I run a test-deployment of this at (tracktrain.stuebinm.eu)[https://tracktrain.stuebinm.eu]. +### API It self-generates an OpenAPI description of the currently implemented routes at -(`/api`)[https://tracktrain.stuebinm.eu/debug/openapi]. - +(`/api/openapi`)[https://tracktrain.stuebinm.eu/debug/openapi]. + +### Metrics +It offers prometheus-compatible metrics under /metrics. Run the server with `+RTS -T` +to also get metrics on the ghc runtime system (via the [prometheus-metrics-ghc](https://hackage.haskell.org/package/prometheus-metrics-ghc-1.0.1.2/docs/Prometheus-Metric-GHC.html +)) +package. + +## Routes +The entire app is written as a single monolithic webserver, so you might want +to restrict access via a reverse-proxy: + - /api must be public (otherwise tracking won't work) + - /api/openapi is a self-description of the API endpoints + - /obu is the onboard-unit for tracking + - /metrics is a prometheus-compatible metrics endpoint + - everything else (including /) is part of the admin interface ## Packages & Modules -- cgit v1.2.3