czerwonk / ping_exporter

Prometheus exporter for ICMP echo requests using https://github.com/digineo/go-ping
MIT License
524 stars 115 forks source link

Alternate DNS server #55

Open ghallford opened 3 years ago

ghallford commented 3 years ago

Hi,

I am using this docker on an Unraid server. I can't find a way to have it start with the --dns.nameserver option to specify a different DNS server. Is there a way to do that via the config.yml or can I add that as a feature request if not? Thanks.

soapiestwaffles commented 2 years ago

I know this is an old issue now, but just in case you haven't found out your answer yet:

there is a way to specify a different DNS server in the config.yml! It is dns.nameserver .

See example:

# ping_exporter/config.yml
targets:
  - "google.com"
  - "youtube.com"
  - "speedtest.net"
dns:
  refresh: 30m
  nameserver: "10.124.0.3"
ping:
  interval: 5s
  timeout: 2s
  history-size: 100
  payload-size: 10