Add ARP collector for Linux (#540)
* Implement commonalities and linux support for ARP collection * Add ARP collector to fixtures and run as part of e2e tests * Bubble up scanner errors * Use single return values where it makes sense * Add missing annotation * Move arp_common into arp_linux * Add license header to arp_linux.go * Address initial feedback * Use strings.Fields instead of strings.Split * Deal with scanner.Err() rather than throwing away errors * Check for scan errors in-line before interacting with the entries map * Don't interact with potentially empty text from scan * Check for scan errors outside the scan loop * Add comment about moving procfs parsing * Add more direct comment * Update initialism style to match go style guide * Put function args on the same line * Add TODO in front of comment about procfs extraction * Guard against strings.Fields returning an empty slice * Be more defensive about ARP table format and use upcase more broadly * Enable the ARP collector by default * Add ARP collector to the README * Remove 'entry'
This commit is contained in:
parent
84b65edb04
commit
6eafa51fa8
6 changed files with 117 additions and 1 deletions
|
|
@ -21,6 +21,7 @@ Which collectors are used is controlled by the `--collectors.enabled` flag.
|
|||
|
||||
Name | Description | OS
|
||||
---------|-------------|----
|
||||
arp | Exposes ARP statistics from `/proc/net/arp`. | Linux
|
||||
conntrack | Shows conntrack statistics (does nothing if no `/proc/sys/net/netfilter/` present). | Linux
|
||||
cpu | Exposes CPU statistics | Darwin, Dragonfly, FreeBSD
|
||||
diskstats | Exposes disk I/O statistics from `/proc/diskstats`. | Linux
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue