From 7bbff7fb86588f1bfbaa0b0d684ca0b5747262b6 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 7ced1af79..4a516a65c 100644 --- a/app/vmselect/main.go +++ b/app/vmselect/main.go @@ -387,8 +387,8 @@ func RequestHandler(w http.ResponseWriter, r *http.Request) bool { w.Header().Set("Content-Type", "application/json; charset=utf-8") fmt.Fprintf(w, "%s", `{"status":"success","data":{"groups":[]}}`) return true - case "/api/v1/alerts": - // Return dumb placehloder for https://prometheus.io/docs/prometheus/latest/querying/api/#alerts + case "/api/v1/alerts", "/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":[]}}`)