Skip to content

PushGateway source does not support protobuf #22782

@vlasov-y

Description

@vlasov-y

A note for the community

No response

Problem

Popeye works with official push-gateway, but does not work with vector's source. I have launched a MITM proxy. That is what I see.

Image

Vector tries to parse metrics as text.

2025-04-03T07:55:28.980887Z  WARN source{component_kind="source" component_id=prometheus_pushgateway component_type=prometheus_pushgateway}:http-request{method=POST path=/metrics/job/popeye/instance@base64/cG9wZXllLWF3cy9kZXZlbG9wbWVudA}: vector::internal_events::http: Received bad request. error=Failed to parse metrics body: name must start with [a-zA-Z_], parsing: `}`, line: `}` error_code=http_response_422 error_type="request_failed" error_stage="receiving" http_code=422 internal_log_rate_limit=true

Configuration

sources:
  prometheus_pushgateway:
    type: prometheus_pushgateway
    address: 0.0.0.0:9091

Version

timberio/vector:0.44.0-distroless-libc@sha256:ae164a9812e1e3d012bf5cb80c84116eb292ba78824ae568b7828f89dd90dc7f

Debug Output


Example Data

curl http://mitm:8080/metrics/job/popeye/instance@base64/cG9wZXllLWF3cy9kZXZlbG9wbWVudA \
	-H 'Host: mitm:8080' \
	-H 'User-Agent: Go-http-client/1.1' \
	-H 'Content-Type: application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited' \
	--compressed -X POST \
	-d @data.raw.txt

data.raw.txt

Additional Context

No response

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugA code related bug.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions