-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose probe_dns_duration_seconds metric #662
Expose probe_dns_duration_seconds metric #662
Conversation
This follows the same pattern as probe_http_duration_seconds and probe_icmp_duration_seconds: it captures the time it takes to perform the actual request, excluding the time it takes to set up things. probe_duration_seconds includes the time to perform the request as well as all the time it takes to set it up. probe_dns_lookup_time_seconds refers to the time it takes to resolve the target's address, so it doesn't capture the time it takes to make one request for that target. Signed-off-by: Marcelo E. Magallon <[email protected]>
The forked version of blackbox_exporter exposes a metric called "probe_dns_duration_seconds", which is the time it takes for the DNS check to run, from connection to query and getting results back. Currently SM is relying on probe_dns_lookup_time_seconds, which is the wrong metric for this check, as that is reporting the time it takes to resolve the _target_, which is the DNS *server*. Since we normally pass an IP address as the target, that resolution time is very low (microseconds). The change in blackbox_exporter is in this PR: prometheus/blackbox_exporter#662 Signed-off-by: Marcelo E. Magallon <[email protected]>
prober/dns.go
Outdated
// we don't use the rtt value returned fom client.Exchange because that | ||
// includes only the time to exchange messages with the server _after_ | ||
// the connection is created. We would in principle have three phases: | ||
// resolve (probe_dns_lookup_time_seconds), connect (request - rtt), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep things similar to the metric in the other probes, we should break this out into its phases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, will do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the phase label and added the three time measurements, as indicated in the original comment.
Follow probe_http_duration_seconds and add a "phase" label to probe_dns_duration_seconds, which splits the time it takes to complete the check into "resolve" (time to resolve the target name), "connect" (time to connect to the DNS server) and "request" (time to send the query and retrieve the response). Signed-off-by: Marcelo E. Magallon <[email protected]>
Thanks! |
The forked version of blackbox_exporter exposes a metric called "probe_dns_duration_seconds", which is the time it takes for the DNS check to run, from connection to query and getting results back. Currently SM is relying on probe_dns_lookup_time_seconds, which is the wrong metric for this check, as that is reporting the time it takes to resolve the _target_, which is the DNS *server*. Since we normally pass an IP address as the target, that resolution time is very low (microseconds). The change in blackbox_exporter is in this PR: prometheus/blackbox_exporter#662 Signed-off-by: Marcelo E. Magallon <[email protected]>
The forked version of blackbox_exporter exposes a metric called "probe_dns_duration_seconds", which is the time it takes for the DNS check to run, from connection to query and getting results back. Currently SM is relying on probe_dns_lookup_time_seconds, which is the wrong metric for this check, as that is reporting the time it takes to resolve the _target_, which is the DNS *server*. Since we normally pass an IP address as the target, that resolution time is very low (microseconds). The change in blackbox_exporter is in this PR: prometheus/blackbox_exporter#662 Signed-off-by: Marcelo E. Magallon <[email protected]>
This follows the same pattern as probe_http_duration_seconds and
probe_icmp_duration_seconds: it captures the time it takes to perform
the actual request, excluding the time it takes to set up things.
probe_duration_seconds includes the time to perform the request as well
as all the time it takes to set it up. probe_dns_lookup_time_seconds
refers to the time it takes to resolve the target's address, so it
doesn't capture the time it takes to make one request for that target.
Signed-off-by: Marcelo E. Magallon [email protected]