mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
follow-up after e2f99214f3e518f79c1c96ff918820a69d350ba1
This commit is contained in:
parent
05bf6cca82
commit
348f705d95
1 changed files with 7 additions and 6 deletions
|
@ -303,6 +303,12 @@ func selectHandler(startTime time.Time, w http.ResponseWriter, r *http.Request,
|
|||
}
|
||||
return true
|
||||
}
|
||||
if strings.HasPrefix(p.Suffix, "graphite/functions") {
|
||||
graphiteFunctionsRequests.Inc()
|
||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||
fmt.Fprintf(w, "%s", `{}`)
|
||||
return true
|
||||
}
|
||||
|
||||
switch p.Suffix {
|
||||
case "prometheus/api/v1/query":
|
||||
|
@ -496,11 +502,6 @@ func selectHandler(startTime time.Time, w http.ResponseWriter, r *http.Request,
|
|||
return true
|
||||
}
|
||||
return true
|
||||
case "graphite/functions":
|
||||
graphiteFunctionsRequests.Inc()
|
||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||
fmt.Fprintf(w, "%s", `{}`)
|
||||
return true
|
||||
case "prometheus/api/v1/rules", "prometheus/rules":
|
||||
// Return dumb placeholder for https://prometheus.io/docs/prometheus/latest/querying/api/#rules
|
||||
rulesRequests.Inc()
|
||||
|
@ -654,7 +655,7 @@ var (
|
|||
graphiteTagsDelSeriesRequests = metrics.NewCounter(`vm_http_requests_total{path="/select/{}/graphite/tags/delSeries"}`)
|
||||
graphiteTagsDelSeriesErrors = metrics.NewCounter(`vm_http_request_errors_total{path="/select/{}/graphite/tags/delSeries"}`)
|
||||
|
||||
graphiteFunctionsRequests = metrics.NewCounter(`vm_http_request_errors_total{path="/select/{}/graphite/functions"}`)
|
||||
graphiteFunctionsRequests = metrics.NewCounter(`vm_http_request_total{path="/select/{}/graphite/functions"}`)
|
||||
|
||||
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"}`)
|
||||
|
|
Loading…
Reference in a new issue