diff --git a/appstate/appstate.go b/appstate/appstate.go index 7938227b3e..792529623d 100644 --- a/appstate/appstate.go +++ b/appstate/appstate.go @@ -28,4 +28,5 @@ type ApplicationState struct { RuleManager rules.RuleManager Storage metric.Storage TargetManager retrieval.TargetManager + BuildInfo map[string]string } diff --git a/main.go b/main.go index a1cb15c0b9..baa3075a20 100644 --- a/main.go +++ b/main.go @@ -91,6 +91,7 @@ func main() { RuleManager: ruleManager, Storage: ts, TargetManager: targetManager, + BuildInfo: BuildInfo, } web.StartServing(appState) diff --git a/web/status.go b/web/status.go index 2874fe9d77..b20bb9b4f8 100644 --- a/web/status.go +++ b/web/status.go @@ -24,6 +24,7 @@ type PrometheusStatus struct { Rules string Status string TargetPools map[string]*retrieval.TargetPool + BuildInfo map[string]string } type StatusHandler struct { @@ -36,6 +37,7 @@ func (h *StatusHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { Rules: "TODO: list rules here", Status: "TODO: add status information here", TargetPools: h.appState.TargetManager.Pools(), + BuildInfo: h.appState.BuildInfo, } executeTemplate(w, "status", status) } diff --git a/web/templates/status.html b/web/templates/status.html index 26b27b6a4d..e1a239eb1a 100644 --- a/web/templates/status.html +++ b/web/templates/status.html @@ -2,23 +2,23 @@ {{define "content"}}
++Configuration
+++{{.Config}} --
{{$key}} | +{{$value}} | +
---|