How does dns_response probe works and how does it measure the response time?
dns_response probe uses third party library c-ares for lookups and the function being used is ares_query.
dns_response probe starts to consume third-party library from version 1.50 released in September 2010
This is an asynchronous call which perform callback when query is completed.
The time difference between registering the callback and when the callback executes is measured.
As we measure the difference, based on system state on which robot is installed we get response time for this query.
Apart from that c-ares is an asynchronous resolver library and is intended for applications which need to perform DNS queries without blocking or need to perform multiple DNS queries in parallel.
Note: The use_host configuration is provided in a raw configuration to switch back to using host utility to get dns response, and as it's synchronous, dns_response probe might be unresponsive for a period of time until nslookup respond back.
If one wants to use nslookup in the dns_response probe, following raw configuration needs to be changed.
1. Open raw configuration for dns_response.
2. Set use_host from yes to no.
3. Click apply to restart probe.