-
Notifications
You must be signed in to change notification settings - Fork 491
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
cmd/scollector: Add additional Linux interfaces #1124
cmd/scollector: Add additional Linux interfaces #1124
Conversation
pdf
commented
Jul 1, 2015
- ppp+
- tun+
- tap+
IIRC these are all virtual interfaces for vpn? If that is the case I think
|
tun and tap devices are commonly used for VPN or other tunnel/virtual interfaces, ppp is point-to-point, commonly used for dialup and *DSL connections, frequently used as WAN for satellite offices. Recommendations? |
@pdf Two main things I'm thinking:
Wonder if people agree with me...? |
@kylebrandt: I was initially leaning toward using the same namespace for all interfaces, but your arguments made me think it's better to keep them in different namespaces. I'm not sure about ppp interfaces though, because traffic may run over a serial line (i.e., actually a different interface) |
@vitorboschi Maybe sys or proc provides a way to distinguish between hardware vs non-hardware ppp devices? |
Maybe checking /sys/class/net//type, but I don't have any ppp device here to test |
@vitorboschi unfortunately there's no distinction (types are in the kernel @kylebrandt shall we just put all these other interfaces under a Perhaps we should include all devices by default and look at sysfs to determine type based on the contents of |
I'm okay with putting them under *.net.virtual. - makes sense to me. I'm not that concerned about the method we use, but I think I like the "don't include" default for interfaces prevents a lot of crap from showing up and is important (in particular with opentsdb where deletion isn't so much of a thing). That and nobody has ever said they needed support for custom interface names yet. |
@kylebrandt if not all interfaces are included by default, I think included interfaces need to be configurable. I've done an audit, and I have a bunch of devices around that don't match the regex, and that I'd like monitored. |
AFAIK physical interfaces link to real devices in, e.g.
|
Here's a first pass, collecting all interfaces by default, categorizing based on I don't have any teamed interfaces configured, I'll set one up later and make sure that gets tagged as If we're sure we don't want to collect all interfaces, I'll add logic to omit virtual devices by default, and allow configuration of which interfaces to include. |
Looks like team devices don't expose anything to identify them via sysfs, so I've fallen back to a regex match for them. Considering team interface names are completely arbitrary that's not reliable, but no worse off than the previous code. Also, FYI, interface names will likely change for many distros shipping full systemd: https://wiki.freedesktop.org/www/Software/systemd/PredictableNetworkInterfaceNames/ This has already occurred in some distros, making them incompatible with current scollector. So, just need to decide if we really don't want to collect all interfaces by default, and if that's the case, what the configuration should look like. |
What's needed to move forward on this one? |
@pdf sorry I'll test this on a few machines today, thanks for the ping |
@captncraig Can you advise why the build is failing here? I would like to get a clean build so I can do some testing and get this merged - @pdf has been pretty patient on this one |
This might be from when esc was borked. If you |
Passing now. |
cmd/scollector: Add additional Linux interfaces