Skip to content
This repository was archived by the owner on Nov 14, 2020. It is now read-only.
This repository was archived by the owner on Nov 14, 2020. It is now read-only.

Telegraf prometheus input fails with 406 Not Acceptable from Prometheus exporter endpoint #12

@00Asgaroth00

Description

@00Asgaroth00

Hi,

I am trying to scrape the prometheus metrics from a RMQ 3.8.0 cluster using telegraf's prometheus input plugin.

When telegraf attempts to connect to the metrics endpoint on RMQ, RMQ responds with 406 Not Acceptable.

Below is a trace of the request/response from the client/server:

Request (Telegraf Prometheus Input Plugin):

T 2019/10/14 12:25:02.854993 10.6.0.227:38254 -> 10.6.0.249:15692 [AP]
GET /metrics HTTP/1.1
Host: 10.6.0.249:15692
User-Agent: Go-http-client/1.1
Accept: application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited;q=0.7,text/plain;version=0.0.4;q=0.3
Accept-Encoding: gzip
Connection: close

Response (RMQ /metrics endpoint)

T 2019/10/14 12:25:02.856160 10.6.0.249:15692 -> 10.6.0.227:38254 [AP]
HTTP/1.1 406 Not Acceptable
connection: close
content-length: 0
date: Mon, 14 Oct 2019 11:25:02 GMT
server: Cowboy

The logs from the telegraf client are as follows:

2019-10-14T11:25:02Z E! [inputs.prometheus]: Error in plugin: http://10.6.0.249:15692/metrics returned HTTP status 406 Not Acceptable
2019-10-14T11:25:10Z D! [outputs.file] buffer fullness: 0 / 10000 metrics. 
2019-10-14T11:25:14Z E! [inputs.prometheus]: Error in plugin: http://10.6.0.249:15692/metrics returned HTTP status 406 Not Acceptable
2019-10-14T11:25:20Z D! [outputs.file] buffer fullness: 0 / 10000 metrics. 
2019-10-14T11:25:20Z E! [inputs.prometheus]: Error in plugin: http://10.6.0.249:15692/metrics returned HTTP status 406 Not Acceptable
2019-10-14T11:25:30Z D! [outputs.file] buffer fullness: 0 / 10000 metrics. 

Would this have something to do with the "Accept:" header in the initial request?
Would it be possible to add support for the prometheus plugin in telegraf?

Thanks for adding the metrics endpoint for monitoring!! If you require any additional information please respond with what you need from me.

Thanks!

EDIT: Link to Telegraf Prometheus Input Plugin

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions