Golang DNS exporter
This service is capable of querying specified DNS servers and domains for health checks. It is suitable for users with a specific DNS infrastructure who require active health checking of servers or domains. Additionally, the service has the capability to log information to files, which proves useful when a dedicated exporter is not needed, and metrics can be pulled using, for example, Node Exporter.
./dns_exporter --config.path="./config.yaml"
# HELP dns_availability DNS Server Status
# TYPE dns_availability gauge
dns_availability{dns_server="1.1.1.1"} 1
# HELP dns_lookup_time DNS lookup time measurement
# TYPE dns_lookup_time gauge
dns_lookup_time{dns_server="1.1.1.1",hostname="facebook.com"} 1.106679625
dns_lookup_time{dns_server="1.1.1.1",hostname="fwefwf.hh"} 0.102711166
dns_lookup_time{dns_server="1.1.1.1",hostname="google.com"} 0.127847708
dns_lookup_time{dns_server="1.1.1.1",hostname="microsoft.com"} 0.146392791
servers:
- 1.1.1.1:
foo: bar
- 8.8.8.8
hosts:
- google.com
- facebook.com
- microsoft.com
- fwefwf.hh
configuration:
externalcollector: False
path: /tmp/exports
filename: exmetrics.prom
interval: 30
timeout: 3
servers
- set servers which you need to checkhosts
- hosts to checkconfiguration
externalcollector
- if you need use own exporter for example NodeExporterpath
- path to write metricsfilename
- file in prom format for use in NodeExporterinterval
- time in seconds after which servers are polledtimeout
- timeout for DNS resolve