prometheus/blackbox_exporter

Specify DNS when probing http

RorFis opened this issue · 1 comments

Hi,
I use blackbox exporter to check the status of multiple urls. The machine where blackbox exporter is installed is setup to use my private DNS which returns private IPs. I was wondering if there was a way to configure blackbox to use a public dns instead of defaulting to the host's one.

If you are on Kubernetes try adding this to your Blackbox Exporter Deployment.

spec:
  dnsPolicy: None
  dnsConfig:
    nameservers:
      - 1.1.1.1
      - 8.8.8.8

If it is installed directly on your machine you can try running it with Docker with this flag: --dns=8.8.8.8 to override your host DNS configuration.