From 00af4ff5a494a256edb20aa3a0ea47d1877889ae Mon Sep 17 00:00:00 2001 From: arnoldyahad Date: Thu, 29 Jul 2021 06:15:35 +0300 Subject: [PATCH] Add case prometheus/rules for grafana 8 (#1502) --- app/vmselect/main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/vmselect/main.go b/app/vmselect/main.go index 0e74e1d27..c2563f489 100644 --- a/app/vmselect/main.go +++ b/app/vmselect/main.go @@ -387,6 +387,12 @@ 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 "prometheus/rules": + // Return dumb placeholder for https://prometheus.io/docs/prometheus/latest/querying/api/#rules + rulesRequests.Inc() + 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 alertsRequests.Inc()