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

[Bug report] Net input plugin broken in v1.3.0 on old CentOS versions #2856

Closed
Fiery-Fenix opened this issue May 25, 2017 · 1 comment
Closed
Labels
bug unexpected problem or unintended behavior regression something that used to work, but is now broken
Milestone

Comments

@Fiery-Fenix
Copy link
Contributor

Fiery-Fenix commented May 25, 2017

Bug report

Relevant telegraf.conf:

# Read metrics about network interface usage
[[inputs.net]]
  ## By default, telegraf gathers stats from any up interface (excluding loopback)
  ## Setting interfaces will tell it to gather these explicit interfaces,
  ## regardless of status.
  ##
  #interfaces = ["eth0"]

System info:

[root@hostA ~]# telegraf --version
Telegraf v1.3.0 (git: release-1.3 2bc5594b44145368823d7aa78bfb753ab51e9235)
[root@hostA ~]# uname -a
Linux hostA 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
[root@hostA ~]# lsb_release -a
LSB Version:    :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description:    CentOS release 5.4 (Final)
Release:        5.4
Codename:       Final
[root@hostA ~]# cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
    lo:32108095  555355    0    0    0     0          0         0 32108095  555355    0    0    0     0       0          0
  eth0:5019464820 14784542    0    0    0     0          0     34733 8907551793 12498214    0    0    0     0       0          0

Steps to reproduce:

  1. CentOS version 5.4
  2. telegraf version 1.3.0 (version 1.2 works fine)
  3. telegraf --config /etc/telegraf/telegraf.conf --config-directory /etc/telegraf/telegraf.d/ --input-filter net --test

Expected behavior:

eth0 interface statistics in test output

Actual behavior:

only "all" interface statistic is in test output

Additional info:

System information from machine with newer CentOS release:

[root@hostB ~]# telegraf --version
Telegraf v1.3.0 (git: release-1.3 2bc5594b44145368823d7aa78bfb753ab51e9235)
[root@hostB ~]# uname -a
Linux hostB 2.6.32-696.1.1.el6.x86_64 #1 SMP Tue Apr 11 17:13:24 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@hostB ~]# lsb_release -a
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 6.9 (Final)
Release:        6.9
Codename:       Final
[root@hostB ~]# cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
    lo: 265254324 1809320    0    0    0     0          0         0 265254324 1809320    0    0    0     0       0          0
  eth0: 193887393605 383619914    0    0    0     0          0         0 133942562211 412596235    0    0    0     0       0          0

As you can see in older CentOS there is NO space after interface name "eth0:" in at /proc/net/dev output and I think that's why it's not working with new release of telegraf.

@danielnelson danielnelson added the bug unexpected problem or unintended behavior label May 25, 2017
@danielnelson danielnelson added this to the 1.3.1 milestone May 25, 2017
@danielnelson danielnelson added the regression something that used to work, but is now broken label May 25, 2017
@danielnelson
Copy link
Contributor

shirou/gopsutil#377

danielnelson added a commit that referenced this issue May 25, 2017
fixes #2856

(cherry picked from commit 03ca397)
vlamug pushed a commit to vlamug/telegraf that referenced this issue May 30, 2017
jeichorn pushed a commit to jeichorn/telegraf that referenced this issue Jul 24, 2017
nevins-b pushed a commit to nevins-b/telegraf that referenced this issue Aug 23, 2017
fixes influxdata#2856

(cherry picked from commit 03ca397)
maxunt pushed a commit that referenced this issue Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior regression something that used to work, but is now broken
Projects
None yet
Development

No branches or pull requests

2 participants