How does dns_response probe work, and how does it measure the response time?
dns_response probe uses a 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 forward which was released in September 2010
This is an asynchronous call which performs a 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 the robot is installed, we get a response time for this query.
Apart from that, C-ares is an asynchronous resolver library and is intended for applications wthatneed to perform DNS queries without blocking or need to perform multiple DNS queries in parallel.
Note: The use_host parameter configuration is provided in the 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 responds back.
If one wants to use nslookup in the dns_response probe, the 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 the probe