grafana / jsonnet-libs

Grafana Labs' Jsonnet libraries
Other
633 stars 160 forks source link

static-exporter: Update httpd.conf file to include headers #1361

Open Pokom opened 3 days ago

Pokom commented 3 days ago

Prometheus v3.0.0 has a stricter requirements on the headers that are returned from exporters. The static-exporter does not set any headers and causes scrapes to fail with the following error:

non-compliant scrape target sending blank Content-Type and no fallback_scrape_protocol specified for target ````

This adds an httpd.conf file to mount to the container that includes a directive to add a header that solves this problem. To generate the httpd.conf file, I ran the following command:

docker run --rm httpd:2.4 cat /usr/local/apache2/conf/httpd.conf > my-httpd.conf

jjo commented 2 days ago

1st pass: