Skip to content

Prometheus metrics named "up" break the prometheus_scrape returns: "error decoding Prometheus Text format"Β #10761

@raymondsowden

Description

@raymondsowden

Bug Report

Describe the bug
I have a Prometheus /metrics endpoint. I have metrics called "up". I am using the prometheus_scrape and it returns: "error decoding Prometheus Text format". If I replicate this on another endpoint and change the metric name to "up_1" it works fine.

I am using the Burning Alchemist sql_exporter and have named targets:

https://github.com/burningalchemist/sql_exporter/blob/master/documentation/sql_exporter.yml

Quote:

Target name (optional). Setting this field enables extra metrics e.g. up and scrape_duration with the target

label that are always returned on a scrape. If set, sql_exporter always returns HTTP 200 with these metrics populated

So I cannot disbaled the up metrics from my endpoint.

To Reproduce
simple python script outputting one metric called up:

from flask import Flask, Response

app = Flask(name)

@app.route("/metrics")
def metrics():
# A single custom metric
metric = """# HELP up A simple example metric

TYPE up gauge

up{job="42"} 1
"""
return Response(metric, mimetype="text/plain")

if name == "main":
app.run(host="0.0.0.0", port=8888)

simple config.yaml:
pipeline:
inputs:
- name: prometheus_scrape
host: 0.0.0.0
port: 8888
tag: vault
metrics_path: /v1/sys/metrics?format=prometheus
scrape_interval: 10s

outputs:
- name: stdout
match: '*'

[2025/08/20 14:40:49] [ info] [fluent bit] version=4.0.7, commit=8c5cbc1bd8, pid=1
[2025/08/20 14:40:49] [ info] [storage] ver=1.5.3, type=memory, sync=normal, checksum=off, max_chunks_up=128
[2025/08/20 14:40:49] [ info] [simd    ] SSE2
[2025/08/20 14:40:49] [ info] [cmetrics] version=1.0.5
[2025/08/20 14:40:49] [ info] [ctraces ] version=0.6.6
[2025/08/20 14:40:49] [ info] [input:prometheus_scrape:prometheus_scrape.0] initializing
[2025/08/20 14:40:49] [ info] [input:prometheus_scrape:prometheus_scrape.0] storage_strategy='memory' (memory only)
[2025/08/20 14:40:49] [ info] [sp] stream processor started
[2025/08/20 14:40:49] [ info] [engine] Shutdown Grace Period=5, Shutdown Input Grace Period=2
[2025/08/20 14:40:49] [ info] [output:stdout:stdout.0] worker #0 started
[2025/08/20 14:41:14] [error] [input:prometheus_scrape:prometheus_scrape.0] error decoding Prometheus Text format

  • Steps to reproduce the problem:

Expected behavior
any metric called up will fail, I expect the prometheus|_scrape to handle metrics called up

Screenshots

Image

Your Environment

  • Version used: 4.0.7
  • Configuration: as per up above
  • Environment name and version (e.g. Kubernetes? What version?):
  • Server type and version:
  • Operating System and version:
  • Filters and plugins:

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions