-
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
[0.10.2] netstat input. Only reports 0 established connections #656
Comments
please provide OS information |
Provided |
Can you also provide:
|
1 and 2 are both the same:
|
gopsutil gathers this info by running https://github.com/shirou/gopsutil/blob/master/net/net_unix.go#L17 |
That explains it. I have to run it as root to get any data. When i run it with sudo -u telegraf it shows nothing. This is the same on all machines i tried with. A few ubuntu and one arch linux and a few cent os 7. |
I see, gopsutil using workaround might be to use |
I also run into this issue on debian machines (8.x on amd64 and armhf). lsof gives no output without root privileges. |
after research and compare PSOF with NETSTAT, i found that psof only show connection status for connections that has a process attached, but TIME_WAIT and other are not related to a process Example:
root@ubuntu# netstat -nap | awk '{print $6}' | sort -n | uniq -c
root@ubuntu# lsof -i -a -n -P | awk '{print $10}' | sort -n | uniq -c
|
I tried to read connection infomation from I think in order to get all users network information, |
I got it. |
btw, look like output inside telegraf plugin be wrong too, don't report more than root@ubuntu# lsof -i -a -n -P | awk '{print $10}' | sort -n | uniq -c
telegraf -test -input-filter netstat -config /etc/telegraf/telegraf.conf
|
This will be fixed when gopsutil no longer uses lsof, see shirou/gopsutil#164, will close this case when Telegraf has updated that dependency |
This issue is still occurring with nightly build: 0.12.0~n1458634430. I believe that this nightly build has the new gopsutil dependency. |
@lswith what is your OS? |
Actually this won't be available until a new nightly gets made tomorrow morning at ~8am GMT. The nightly build process was broken for a moment because we now require Go 1.6 with the gdm dependencies. |
downloaded the nightly build rpm! |
netstat -anp | grep EST | wc -l
shows 43 right now.But the netstat input only report 0.
OS:
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
The text was updated successfully, but these errors were encountered: