From 9375b60c5f2a25ee66e91a0af5b570776cfdf371 Mon Sep 17 00:00:00 2001 From: f41gh7 Date: Thu, 16 Sep 2021 11:18:26 +0300 Subject: [PATCH] adds stub for functions api --- app/vmselect/main.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/vmselect/main.go b/app/vmselect/main.go index 00654edaa..a45342047 100644 --- a/app/vmselect/main.go +++ b/app/vmselect/main.go @@ -198,7 +198,12 @@ func RequestHandler(w http.ResponseWriter, r *http.Request) bool { } return true } - + if strings.HasPrefix(path, "/functions") { + graphiteFunctionsRequests.Inc() + w.Header().Set("Content-Type", "application/json; charset=utf-8") + fmt.Fprintf(w, "%s", `{}`) + return true + } switch path { case "/api/v1/query": queryRequests.Inc() @@ -544,6 +549,8 @@ var ( graphiteTagsDelSeriesRequests = metrics.NewCounter(`vm_http_requests_total{path="/tags/delSeries"}`) graphiteTagsDelSeriesErrors = metrics.NewCounter(`vm_http_request_errors_total{path="/tags/delSeries"}`) + graphiteFunctionsRequests = metrics.NewCounter(`vm_http_request_total{path="/functions"}`) + rulesRequests = metrics.NewCounter(`vm_http_requests_total{path="/api/v1/rules"}`) alertsRequests = metrics.NewCounter(`vm_http_requests_total{path="/api/v1/alerts"}`) metadataRequests = metrics.NewCounter(`vm_http_requests_total{path="/api/v1/metadata"}`)