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
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:
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