Skip to content
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

ifstat metrics not reported for some interfaces based on their name #1912

Closed
ncabatoff opened this issue Sep 16, 2016 · 2 comments
Closed

ifstat metrics not reported for some interfaces based on their name #1912

ncabatoff opened this issue Sep 16, 2016 · 2 comments
Labels

Comments

@ncabatoff
Copy link

ncabatoff commented Sep 16, 2016

My desktop's NIC is named enp0s25. A virtualbox guest of it has enp0s3. Neither of them produce ifstat metrics like linux_net_packets, linux_net_errs, etc. The code seems to require that the second line of /proc/net/dev must match this RE:

\s(eth\d+|em\d+_\d+/\d+|em\d+_\d+|em\d+|bond\d+|team\d+|p\d+p\d+_\d+/\d+|p\d+p\d+_\d+|p\d+p\d+):(.*)

It looks like my NICs are being rejected on two counts. First, their names are not in the whitelisted list of patterns. Second, their names are too long, so Linux doesn't put a leading space (the \s at the start of the pattern.) For example:

Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
enp0s3: 1006267169 6639248    0    0    0     0          0    256352 5176892906 3667957    0    0    0     0       0          0
    lo: 169963776847 304993459    0    0    0     0          0         0 169963776847 304993459    0    0    0     0       0          0
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
enp0s25: 53576888423 79602006    0    0    0     0          0   4945828 16893672173 44642474    0    0    0     0       0          0
    lo: 1138405080 1845942    0    0    0     0          0         0 1138405080 1845942    0    0    0     0       0          0

By comparison, here's one that does work:

Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
    lo:3038824498023 3525462214    0    0    0     0          0         0 3038824498023 3525462214    0    0    0     0       0          0
  eth0:96763269978 225152313    0    0    0     0          0  16490262 142000936142 190268875    0    0    0     0       0          0
@kylebrandt
Copy link
Member

#1756 (comment)

@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 as completed Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants