From e2257b990abd2434065faaf0b7e0e49d5639097a Mon Sep 17 00:00:00 2001 From: Peter Deng Date: Wed, 24 Mar 2021 22:51:55 +0800 Subject: [PATCH] Accept text/plain type by default for prometheus client scraping (#24622) --- CHANGELOG.next.asciidoc | 1 + metricbeat/helper/prometheus/prometheus.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 1981b0119e2..c53baf79381 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -491,6 +491,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Fix GCP not able to request Cloudfunctions metrics if a region filter was set {pull}24218[24218] - Fix type of `uwsgi.status.worker.rss` type. {pull}24468[24468] - Ignore unsupported derive types for filesystem metricset. {issue}22501[22501] {pull}24502[24502] +- Accept text/plain type by default for prometheus client scraping. {pull}24622[24622] *Packetbeat* diff --git a/metricbeat/helper/prometheus/prometheus.go b/metricbeat/helper/prometheus/prometheus.go index 0add9edd9bb..3568310466e 100644 --- a/metricbeat/helper/prometheus/prometheus.go +++ b/metricbeat/helper/prometheus/prometheus.go @@ -35,7 +35,7 @@ import ( "github.com/elastic/beats/v7/metricbeat/mb" ) -const acceptHeader = `application/openmetrics-text; version=0.0.1,text/plain;version=0.0.4;q=0.5,*/*;q=0.1` +const acceptHeader = `text/plain;version=0.0.4;q=0.5,*/*;q=0.1` // Prometheus helper retrieves prometheus formatted metrics type Prometheus interface {