Skip to content

Feature request: snappy support for pushgateway #441

@mEDI-S

Description

@mEDI-S

Hi, I have the last days played with the pushgateway and Telegraf and have found a smal problem. Telegraf use snappy as Push Encoding and the pushgateway from prometheus do it not understand or have problems with it.

i have tested version 1.2.0 and 1.4.2
and Telegraf 1.20.3

Net Sniff

    POST /metrics/job/server-monitor/instance/bla HTTP/1.1
    Host: prometeuspush.test.service
    User-Agent: Telegraf/1.20.3 Go/1.17.2
    Content-Length: 4584
    Content-Encoding: snappy
    Content-Type: application/x-protobuf
    X-Prometheus-Remote-Write-Version: 0.1.0
    Accept-Encoding: gzip
    
    ....q
    ...CUT...
    HTTP/1.1 400 Bad Request
    Date: Fri, 12 Nov 2021 14:30:48 GMT
    Content-Type: text/plain; charset=utf-8
    Content-Length: 57
    Connection: keep-alive
    X-Content-Type-Options: nosniff
    
    text format parsing error in line 1: invalid metric name

Telegraf sources

https://github.com/influxdata/telegraf/blame/b9c444bae8617cc0aa2c2dda81abf435420b6272/plugins/serializers/prometheusremotewrite/prometheusremotewrite.go#L243

Hoppe i'm not wrong with this Request

Have a nice day

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions