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 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 {