- 'cmp' as a parameter to the sorted() function doesn't exist anymore.
- Instead, we should use 'key', which tells the sorted() function what to sort by.
- Per https://docs.python.org/3/howto/sorting.html#key-functions, we can define a function
to be run against each item in the iterable that will return a value that sorted() will
sort by.
- Since the original function seems to compare lengths in the hostname entries, we can actually
make fqdn_sort_fn() a great deal simpler than it was and get largely the same results.
The `linux_netlink.ls` function used a regex to choose which interfaces
to collect metric for.
`_alphanum_re = re.compile(r'^[a-z0-9]+$')`
Unfortunately, by default this excludes vlan and tap interfaces, which
are kind of important. ie `bond0.120` or `tap2a3dab86-fb`.
We also have a problem where even if we update the regex to include
these interfaces... if someone deletes and spawns a new instance then
the tap device name changes on the compute host, which will not be
monitored unless someone re-runs the `collectd` on the compute again.
Less than ideal.
This commit lets us choose `VerboseInterface "all"` using Pillar data
to avoid this problem.
This patch replaces the "interface" collectd plugin by the "netlink" one. The
"netlink" plugin provides the same metrics as "interface" but plus other
metrics such as the number of dropped packets.