Among the Blackbox exporter's probe types is DNS.
If you visit http://localhost:9115/probe?module=dns_rp_mx&target=8.8.8.8 this will be tested against Google's Public DNS, and should succeed. In reality you'd usually point this at your own authoritative DNS servers using a sample query rather than verifying that a public DNS service is working - though you could also use it like this to check that records like MX are present. For A and AAAA records you're generally better off using an icmp/tcp/http probe to see if the service as a whole is working, which will implicitly also test DNS. As mentioned in a previous post, you can also add the debug parameter to see the full DNS response: http://localhost:9115/probe?module=dns_rp_mx&target=8.8.8.8&debug=true.
- 8.8.4.4  # Test various public DNS providers are working.
Other features of the DNS prober include being able to select TCP or UDP, checking the response code, and checking authoritative and additional resource records that are returned.
Have questions about the Blackbox exporter? Contact us.