From b02a88e73754a6d21ddd1856f8c7fa4c12bb2261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Sat, 22 Apr 2017 21:14:56 -0700 Subject: [PATCH 1/2] Add a note about metrics --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 555242bf6..db7fb2743 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,12 @@ to alert data, therefore safe to be accessed by wider audience. Alertmanager's API isn't stable yet and can change between releases. unsee currently supports Alertmanager `0.4` and `0.5`. +## Metrics + +unsee process metrics are accessible under `/metrics` path by default. +If you set the [WEB_PREFIX](#web_prefix) option a path relative to it will be +used. + ## Known issues * When a new alert is triggered unsee might show it for a few minutes even if From acea192a3dc8d48708161b81ba00c60dff746644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Sat, 22 Apr 2017 21:20:45 -0700 Subject: [PATCH 2/2] Obey WEB_PREFIX for metrics endpoint --- main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/main.go b/main.go index acfcae8cd..145bc4f9d 100644 --- a/main.go +++ b/main.go @@ -120,6 +120,7 @@ func main() { router.SetHTMLTemplate(loadTemplates("templates")) prom := ginprometheus.NewPrometheus("gin") + prom.MetricsPath = getViewURL("/metrics") prom.Use(router) if config.Config.Debug {