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

Use go-ping to implement ICMP probes #778

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Use go-ping to implement ICMP probes #778

wants to merge 1 commit into from

Conversation

mem
Copy link
Contributor

@mem mem commented Apr 19, 2021

While working on a change to the ICMP prober, I got a little frustrated at the structure of that code. I tried a small rewrite a couple of times before realizing that there's actually a nice library out there that BBE can use, nameping go-ping. It has several good things going for it, but the most notable is that the code is very well organized.

I would like to propose that we swap the current implementation for this one.

Signed-off-by: Marcelo E. Magallon [email protected]

@mem mem requested review from SuperQ and roidelapluie April 19, 2021 22:49
@SuperQ
Copy link
Member

SuperQ commented Apr 20, 2021

Hmm, I'm not sure I would like to swap this out. There are some nice things about the go-ping library, but it's maybe not appropriate for use here. We would need to be very careful about testing and making sure this doesn't break the existing behavior.

@SuperQ SuperQ marked this pull request as draft April 20, 2021 09:57
@SuperQ
Copy link
Member

SuperQ commented Apr 20, 2021

I've marked this as draft since we need Don't Fragment support first.

@mem
Copy link
Contributor Author

mem commented Apr 20, 2021

Hmm, I'm not sure I would like to swap this out. There are some nice things about the go-ping library, but it's maybe not appropriate for use here. We would need to be very careful about testing and making sure this doesn't break the existing behavior.

I get you. Part of the motivation is precisely that we don't have tests for the code in icmp.go, and that in turn is due partly to the structure of that code. go-ping on the other hand does have tests for important parts of the code, and some of the recent changes enable testing of the more complicated parts (even if I haven't had the chance to write those tests).

Signed-off-by: Marcelo E. Magallon <[email protected]>
@outofrange
Copy link

If I understand previously merge PRs around this topic correctly, there is another difference between the ICMP implementation of blackbox_exporter and go-ping:
You seem to be using randomized ICMP identifiers to avoid NAT issues (/pull/412), while go-ping doesn't support setting the identifier yet: digineo/go-ping/pull/19

@razvancostincalin
Copy link

razvancostincalin commented May 20, 2024

Hi,

I can see that digineo/go-ping#19 has already been merged.
Is there anything else blocking this from moving forward?

I think it will be nice addition to blackbox.

Thanks

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.

4 participants