-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Drop and Error statistics on virtual interfaces not reported correctly #2111
Comments
can you provide output of TBH I'm tempted to close this because I think it's reasonable to assume that /proc/net/dev is correct, unless there is a reasonable workaround using procfs. |
@sparrc Hi, I updated the bug report, "/proc/net/dev" provides the desired output (my apologies), I looked @ the wrong field. But the issue remains the same, the "drop_in" and "drop_out" counters do not get updated inside influxdb, the value remains 0. uname -a:
|
Some extra information:
As you can see, it does provide the correct values for video, video2 and video3 interfaces (Those are non-VLAN) interfaces. |
please send output of |
@sparrc See attached file |
@Sil5nc5 afaict these numbers match what you have in the db. your db values are not 0 for video, video2, or video3 |
@sparrc The values for the drop_out (drops on the sending side / TX / Transmit) are 1281423891 (video2.1602) / 1281423891 (video3.1296) / 1281423891 (video.1297). But in InfluxDB they are 0. |
ah, so do I understand right that this doesn't have anything to do with the VLAN then? |
To be absolutely sure, I would have to trigger drops on the other interfaces to verify if this is the case. I will try it tomorrow. Or I will try to trigger RX errors on those interfaces to see if those values are correctly stored in the database. I'll get back to you. |
I may have located the issue, the library we use to get system stats appears to be indexing the fields incorrectly here: https://github.com/shirou/gopsutil/blob/master/net/net_linux.go#L82-L89, I'll open an issue there and see if we can get that fixed. (dropOut should actually be the 11th index) |
@sparrc great find! |
closed by #2353 |
Bug report
Relevant telegraf.conf:
Default configuration writing to InfluxDB with 1 metric enabled:
...
[[inputs.net]]
interfaces = ["video.1297"]
...
System info:
OS: Centos 7.2
Telegraf v1.1.1 (git: release-1.1.0 94de9dc)
InfluxDB shell version: 1.1.0
Steps to reproduce:
Expected behavior:
When drops or errors occur on the VLAN interface as shown by commands like:
then those drop/err values should be present in InfluxDB.
Actual behavior:
Those values are always 0.
Additional info:
After some digging, basically stracing the Telegraf process (strace -p -ff -s 1500 $(pgrep telegraf), I found out that /proc/net/dev is used to gather the interface statistics. If I "cat" those statistics on a regular basis (every 5s), the drop/err counters for the VLAN interface are available but the values are not put correctly in influxDB. The "drop_in" and "drop_out" counter are 0 for that VLAN interface.
Telegraf strace:
Telegraf_Strace.txt
InfluxDB output:
IP output (ip -s l):
Output "/proc/net/dev":
Proposal:
N/A
Current behavior:
Counter for drop/err remains 0.
Desired behavior:
Get the drop/err counters for the VLAN interface in InfluxDB using Telegraf.
Use case: [Why is this important (helps with prioritizing requests)]
Everybody who has VLAN interfaces configured and want to gather all the statistics. Now one assumes no drops ever happen on those interfaces, so no possible alerts get triggered.
The text was updated successfully, but these errors were encountered: