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

Add ICMP duration metrics #346

Merged
merged 2 commits into from
Jul 24, 2018
Merged

Add ICMP duration metrics #346

merged 2 commits into from
Jul 24, 2018

Conversation

SuperQ
Copy link
Member

@SuperQ SuperQ commented Jul 24, 2018

Add a gauge to measure various parts of the ICMP probe.

Fixes: #315

@SuperQ SuperQ requested a review from brian-brazil July 24, 2018 19:38
prober/icmp.go Outdated

durationGaugeVec = prometheus.NewGaugeVec(prometheus.GaugeOpts{
Name: "probe_icmp_duration_seconds",
Help: "Duration of http request by phase, summed over all redirects",
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs updating

Copy link
Member Author

Choose a reason for hiding this comment

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

Whups, copy-pasta. :)

@SuperQ
Copy link
Member Author

SuperQ commented Jul 24, 2018

I did some testing, the Go ICMP code seems way slower than the normal C ping program. For example, over my local ethernet:

10 packets transmitted, 10 received, 0% packet loss, time 9218ms
rtt min/avg/max/mdev = 0.312/0.354/0.396/0.031 ms

With the blackbox_exporter:

probe_icmp_duration_seconds{phase="rtt"} 0.000537164
probe_icmp_duration_seconds{phase="rtt"} 0.000538153
probe_icmp_duration_seconds{phase="rtt"} 0.000447007
probe_icmp_duration_seconds{phase="rtt"} 0.00060231
probe_icmp_duration_seconds{phase="rtt"} 0.000539882
probe_icmp_duration_seconds{phase="rtt"} 0.000630896
probe_icmp_duration_seconds{phase="rtt"} 0.000521305
probe_icmp_duration_seconds{phase="rtt"} 0.000569541
probe_icmp_duration_seconds{phase="rtt"} 0.000598364
probe_icmp_duration_seconds{phase="rtt"} 0.000574883

Go seems to add about 200us to the ping time. (average 556us)

This is still far more accurate than the full probe_duration_seconds.

probe_duration_seconds 0.001279944
probe_duration_seconds 0.000909941
probe_duration_seconds 0.000842068
probe_duration_seconds 0.000947099
probe_duration_seconds 0.000957239
probe_duration_seconds 0.001390443
probe_duration_seconds 0.001156965
probe_duration_seconds 0.001060642
probe_duration_seconds 0.00130084
probe_duration_seconds 0.0013451

@SuperQ
Copy link
Member Author

SuperQ commented Jul 24, 2018

FYI, Travis is failing due to Go 1.11 go fmt.

Add a gauge to measure various parts of the ICMP probe.

Signed-off-by: Ben Kochie <superq@gmail.com>
Update travis config to match upstream prometheus.

Signed-off-by: Ben Kochie <superq@gmail.com>
@brian-brazil brian-brazil merged commit 2a04b8e into master Jul 24, 2018
@brian-brazil brian-brazil deleted the bjk/icmp_rtt branch July 24, 2018 20:12
@baiwfg2
Copy link

baiwfg2 commented Oct 17, 2018

@brian-brazil @SuperQ Does probe_icmp_duration_seconds exist in current version ? I don't see it in prometheus metric list:

blackbox-exporter

@c0dyhi11
Copy link

c0dyhi11 commented May 10, 2019

@brian-brazil @SuperQ Does probe_icmp_duration_seconds exist in current version ? I don't see it in prometheus metric list:

Same here...

@zhangzheng1019
Copy link

@SuperQ @brian-brazil Similarly, I don’t have an ICMP indicator here.
image
image

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.

ICMP RTT not accurate
5 participants