aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorstuebinm2022-10-16 13:14:33 +0200
committerstuebinm2022-10-16 13:14:33 +0200
commita07ff36396dd5ad8580e504134e38a6ee0797908 (patch)
tree791c31deed9a3a3f106d40466376cf10acdd83a7 /README.md
parent2b5c5f8707feaa9906c85b44dc65602826b861a7 (diff)
simple prometheus metrics
Diffstat (limited to 'README.md')
-rw-r--r--README.md19
1 files changed, 17 insertions, 2 deletions
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