这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Conversation

@clinta
Copy link
Contributor

@clinta clinta commented Mar 30, 2018

This PR is a rewrite of the icmp collector. It replaces go-fastping with go-multiping a library I wrote with scollector in mind.

With the current ICMP implementation, go-fastping opens a raw socket for each host being pinged, and then must process every ICMP packet the host receives to find the one it is looking for. We have some scollector hosts which ping over 1000 hosts, so every 15 seconds, 1000 raw socket listeners are started, and 1000 go-fastping threads must each process all 1000 responses to find the one they want.

This new implementation opens only one socket, and calls the appropriate handler for a given response.

This implementation also delays the first ping for a random duration up to the configured interval to even out the spikes of icmp traffic.

This PR also adds the ability to override the timeout and interval for individual hosts and on non-windows systems adds a metric for graphing the TTL on ICMP responses which can give insight into routing changes.

@clinta clinta force-pushed the newping2 branch 2 times, most recently from 0f61cc2 to b7915c2 Compare April 2, 2018 12:43
clinta added 2 commits April 2, 2018 08:55
context switches, and allow graphing the RTT and resolution success for
pings. Provide options to override ICMP intervals and timeouts on a
per-host basis.
@captncraig
Copy link
Contributor

Wow, that seems pretty cool. Will need to look it over pretty closely, but it does seem to be a good improvement. I was never very pleased with how that all worked.

@stale
Copy link

stale bot commented Oct 1, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 1, 2020
@stale stale bot closed this Oct 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants