Skip to content
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

Merged
merged 2 commits into from
Jul 13, 2020
Merged

Expose probe_dns_duration_seconds metric #662

merged 2 commits into from
Jul 13, 2020

Conversation

mem
Copy link
Contributor

@mem mem commented Jul 9, 2020

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]

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]>
mem added a commit to grafana/synthetic-monitoring-agent that referenced this pull request Jul 9, 2020
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),
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, will do

Copy link
Contributor Author

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]>
@mem mem requested a review from brian-brazil July 10, 2020 15:57
@brian-brazil brian-brazil merged commit 55c667a into prometheus:master Jul 13, 2020
@brian-brazil
Copy link
Contributor

Thanks!

mem added a commit to grafana/synthetic-monitoring-agent that referenced this pull request Jul 13, 2020
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]>
mem added a commit to grafana/synthetic-monitoring-agent that referenced this pull request Jul 13, 2020
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants