diff --git a/app/vmselect/main.go b/app/vmselect/main.go index 36a35d72f8..255e387ee3 100644 --- a/app/vmselect/main.go +++ b/app/vmselect/main.go @@ -263,6 +263,12 @@ func selectHandler(w http.ResponseWriter, r *http.Request, p *httpserver.Path, a w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, "%s", `{"status":"success","data":{"alerts":[]}}`) return true + case "prometheus/api/v1/metadata": + // Return dumb placeholder + metadataRequests.Inc() + w.Header().Set("Content-Type", "application/json") + fmt.Fprintf(w, "%s", `{"status":"success","data":{}}`) + return true default: return false } @@ -327,6 +333,7 @@ var ( federateRequests = metrics.NewCounter(`vm_http_requests_total{path="/select/{}/prometheus/federate"}`) federateErrors = metrics.NewCounter(`vm_http_request_errors_total{path="/select/{}/prometheus/federate"}`) - rulesRequests = metrics.NewCounter(`vm_http_requests_total{path="/select/{}/prometheus/api/v1/rules"}`) - alertsRequests = metrics.NewCounter(`vm_http_requests_total{path="/select/{}/prometheus/api/v1/alerts"}`) + rulesRequests = metrics.NewCounter(`vm_http_requests_total{path="/select/{}/prometheus/api/v1/rules"}`) + alertsRequests = metrics.NewCounter(`vm_http_requests_total{path="/select/{}/prometheus/api/v1/alerts"}`) + metadataRequests = metrics.NewCounter(`vm_http_requests_total{path="/select/{}/prometheus/api/v1/metadata"}`) )