-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Content-Type "text/plain; version=0.0.4, charset=utf-8" fails to parse, and requires fallback_scrape_protocol=PrometheusText0.0.4 #15777
Copy link
Copy link
Closed
Description
What did you do?
Confiigure scraping of exporter which specifies the charset=utf-8 in its content-type, i.e. text/plain; version=0.0.4, charset=utf-8
What did you expect to see?
Prometheus should properly extract the content-type
HTTP uses "charset" names to indicate or negotiate the character encoding scheme ([RFC6365], Section 2) of a textual representation. In the fields defined by this document, charset names appear either in parameters (Content-Type), [...]
What did you see instead? Under which circumstances?
Error scraping target: cannot parse Content-Type "text/plain; version=0.0.4, charset=utf-8" and no fallback_scrape_protocol for target mime: invalid media parameter
System information
No response
Prometheus version
prometheus, version 3.0.1 (branch: HEAD, revision: 1f56e8492c31a558ccea833027db4bd7f8b6d0e9)
build user: root@9c13055ffc3c
build date: 20241128-17:20:55
go version: go1.23.3
platform: linux/amd64
tags: netgo,builtinassets,stringlabels
Prometheus configuration file
No response
Alertmanager version
No response
Alertmanager configuration file
No response
Logs
Failed to determine correct type of scrape target." component="scrape manager" scrape_pool=serviceMonitor/gitlab/gitlab-gitlab-exporter/0 target=http://192.168.12.14:9168/metrics content_type="text/plain; version=0.0.4, charset=utf-8" fallback_media_type="" err="cannot parse Content-Type \"text/plain; version=0.0.4, charset=utf-8\" and no fallback_scrape_protocol for target\nmime: invalid media parameter"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels