tomwilkie
released this
10 Feb 09:52
·
704 commits
to master
since this release
Node Exporter release with --web.extra-headers
flag.
To add arbitrary headers to the HTTP response for /
and /metrics
, run node_exporter --web.extra-headers=Foo=bar
:
$ curl -vq http://localhost:9100/metrics
* TCP_NODELAY set
* Connected to localhost (::1) port 9100 (#0)
> GET /metrics HTTP/1.1
> Host: localhost:9100
> User-Agent: curl/7.64.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: text/plain; version=0.0.4; charset=utf-8
< Foo: bar
< Date: Mon, 10 Feb 2020 09:53:54 GMT
< Transfer-Encoding: chunked
<
{
# HELP go_gc_duration_seconds A summary of the GC invocation durations.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0
...
The flag can be repeated to add multiple headers.