Closed L1Cafe closed 1 year ago
Hi L1Cafe,
the exporter sends back content-type: text/plain; version=0.0.4
.
Doesn't it work?
Hi @MindFlavor , thanks for getting back to me.
I verified (and merged my patch) into InfluxDB v2 that assumes text/plain
when this exporter doesn't return such header.
I verified this using the browser inspector as well as Burp Suite. The Wireguard exporter is most definitely not returning such header when I tested it.
However, three other things could be going on:
curl
actually assumes text/plain
when not specified.Let's do one thing, leave this issue open, I'll test this out by compiling from source and come back to you if a patch is necessary.
Yes the older version was definitely not sending the header. It has been added to the depending crate prometheus_exporter_base in this PR: https://github.com/MindFlavor/prometheus_exporter_base/pull/25. The dependency has been updated here: https://github.com/MindFlavor/prometheus_wireguard_exporter/commit/61de41169befdd7366067ec0e7515a1197a692e4 .
So content-type should be available since version 3.6.2, not before 👍
OK, my apologies for reporting an older bug. I'll just test on upstream before opening issues next time. Thanks for the quick reply!
Hello! Continuing on the conversation from https://github.com/influxdata/influxdb/issues/20193
Your exporter fails to declare a
Content-Type
HTTP header.This means that InfluxDB v2 (without my patch) will not be able to collect this data.
Ideally, InfluxDB v2 should fix this behaviour, but considering major web browsers also fall back to
text/plain
when theContent-Type
is not provided, it would be very useful to fix it here, as well. Should be a really short patch. Let me know if you want me to write it for you.