diff --git a/app/vmagent/main.go b/app/vmagent/main.go index 5d019d831..812fc5d74 100644 --- a/app/vmagent/main.go +++ b/app/vmagent/main.go @@ -273,6 +273,11 @@ func requestHandler(w http.ResponseWriter, r *http.Request) bool { w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, `{}`) return true + case "/datadog/api/v1/metadata": + datadogMetadataRequests.Inc() + w.Header().Set("Content-Type", "application/json") + fmt.Fprintf(w, `{}`) + return true case "/targets": promscrapeTargetsRequests.Inc() promscrape.WriteHumanReadableTargetsStatus(w, r) @@ -492,6 +497,7 @@ var ( datadogValidateRequests = metrics.NewCounter(`vmagent_http_requests_total{path="/datadog/api/v1/validate", protocol="datadog"}`) datadogCheckRunRequests = metrics.NewCounter(`vmagent_http_requests_total{path="/datadog/api/v1/check_run", protocol="datadog"}`) datadogIntakeRequests = metrics.NewCounter(`vmagent_http_requests_total{path="/datadog/intake", protocol="datadog"}`) + datadogMetadataRequests = metrics.NewCounter(`vmagent_http_requests_total{path="/datadog/api/v1/metadata", protocol="datadog"}`) promscrapeTargetsRequests = metrics.NewCounter(`vmagent_http_requests_total{path="/targets"}`) promscrapeServiceDiscoveryRequests = metrics.NewCounter(`vmagent_http_requests_total{path="/service-discovery"}`) diff --git a/app/vminsert/main.go b/app/vminsert/main.go index 11d77f199..90836da57 100644 --- a/app/vminsert/main.go +++ b/app/vminsert/main.go @@ -212,6 +212,11 @@ func RequestHandler(w http.ResponseWriter, r *http.Request) bool { w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, `{}`) return true + case "/datadog/api/v1/metadata": + datadogMetadataRequests.Inc() + w.Header().Set("Content-Type", "application/json") + fmt.Fprintf(w, `{}`) + return true case "/prometheus/targets", "/targets": promscrapeTargetsRequests.Inc() promscrape.WriteHumanReadableTargetsStatus(w, r) @@ -319,6 +324,7 @@ var ( datadogValidateRequests = metrics.NewCounter(`vm_http_requests_total{path="/datadog/api/v1/validate", protocol="datadog"}`) datadogCheckRunRequests = metrics.NewCounter(`vm_http_requests_total{path="/datadog/api/v1/check_run", protocol="datadog"}`) datadogIntakeRequests = metrics.NewCounter(`vm_http_requests_total{path="/datadog/intake", protocol="datadog"}`) + datadogMetadataRequests = metrics.NewCounter(`vm_http_requests_total{path="/datadog/api/v1/metadata", protocol="datadog"}`) promscrapeTargetsRequests = metrics.NewCounter(`vm_http_requests_total{path="/targets"}`) promscrapeServiceDiscoveryRequests = metrics.NewCounter(`vm_http_requests_total{path="/service-discovery"}`)