diff --git a/promql/engine.go b/promql/engine.go index 72f019e00..1cdac0828 100644 --- a/promql/engine.go +++ b/promql/engine.go @@ -59,7 +59,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "query_duration_seconds", - Help: "Query timmings", + Help: "Query timings", ConstLabels: prometheus.Labels{"slice": "prepare_time"}, }, ) @@ -68,7 +68,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "query_duration_seconds", - Help: "Query timmings", + Help: "Query timings", ConstLabels: prometheus.Labels{"slice": "inner_eval"}, }, ) @@ -77,7 +77,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "query_duration_seconds", - Help: "Query timmings", + Help: "Query timings", ConstLabels: prometheus.Labels{"slice": "result_append"}, }, ) @@ -86,7 +86,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "query_duration_seconds", - Help: "Query timmings", + Help: "Query timings", ConstLabels: prometheus.Labels{"slice": "result_sort"}, }, ) diff --git a/web/api/v1/api.go b/web/api/v1/api.go index 9a2e2361b..566f62680 100644 --- a/web/api/v1/api.go +++ b/web/api/v1/api.go @@ -345,6 +345,7 @@ func (api *API) dropSeries(r *http.Request) (interface{}, *apiError) { return res, nil } +// Target has the information for 1 target. type Target struct { // Labels before any processing. DiscoveredLabels model.LabelSet `json:"discoveredLabels"` @@ -358,6 +359,7 @@ type Target struct { Health retrieval.TargetHealth `json:"health"` } +// TargetDiscovery has all the active targets. type TargetDiscovery struct { ActiveTargets []*Target `json:"activeTargets"` } @@ -386,10 +388,12 @@ func (api *API) targets(r *http.Request) (interface{}, *apiError) { return res, nil } +// AlertmanagerDiscovery has all the active alert-managers type AlertmanagerDiscovery struct { ActiveAlertmanagers []*AlertmanagerTarget `json:"activeAlertmanagers"` } +// AlertmanagerTarget has info on 1 AM type AlertmanagerTarget struct { URL string `json:"url"` }