From 3f3ad13753e9881560f08131f24bcdae7f7ad4b2 Mon Sep 17 00:00:00 2001 From: Nikolay Date: Mon, 2 Aug 2021 17:28:09 +0300 Subject: [PATCH] adds /rules and /alerts api for grafana (#1504) Co-authored-by: Aliaksandr Valialkin --- app/vmselect/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/vmselect/main.go b/app/vmselect/main.go index fd909b544b..8a933b1d40 100644 --- a/app/vmselect/main.go +++ b/app/vmselect/main.go @@ -468,8 +468,8 @@ func selectHandler(startTime time.Time, w http.ResponseWriter, r *http.Request, w.Header().Set("Content-Type", "application/json; charset=utf-8") fmt.Fprintf(w, "%s", `{"status":"success","data":{"groups":[]}}`) return true - case "prometheus/api/v1/alerts": - // Return dumb placehloder for https://prometheus.io/docs/prometheus/latest/querying/api/#alerts + case "prometheus/api/v1/alerts", "prometheus/alerts": + // Return dumb placeholder for https://prometheus.io/docs/prometheus/latest/querying/api/#alerts alertsRequests.Inc() w.Header().Set("Content-Type", "application/json; charset=utf-8") fmt.Fprintf(w, "%s", `{"status":"success","data":{"alerts":[]}}`)