Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds additional networking related metrics from /proc/net/netstat, /proc/net/snmp and /proc/net/udp under the
system.net
anddocker.net
namespaces.Originally written by @ejholmes (DataDog/dd-agent#2864)
Motivation
The built-in network.py check doesn't give an accurate representation of TCP connection states, since it only represents the state at the time the metrics were collected. The raw metrics from /proc/net provide a much more granular and accurate view of networking.
For example,
/proc/net/netstat
gives a much more accurate representation for things like number of TCP connections opened, since it's a monotonically increasing counter within the Kernel.Additional Notes
There's a similar PR open at DataDog/dd-agent#2720, but it's not Docker aware, which is a necessity for us at Remind. We've also chosen to use monotonic counters instead of rates, since that gives us a more accurate representation of how many events occurred in a time frame.
Hopefully we can combine ideas from both PR's, and get a more releasable version of this into
network.py
.Note (cc @ejholmes)
Changes to the core (ie. docker_daemon), and the addition of the network utils has been removed from this PR when compared to the original. If you still wish us to consider that please feel free a specific PR for that in https://github.com/DataDog/dd-agent repo.