sensu-plugins / sensu-plugins-network-checks

This plugin provides native network instrumentation for monitoring and metrics collection, including: hardware, TCP response, RBLs, whois, port status, and more.
http://sensu-plugins.io
MIT License
30 stars 76 forks source link

metrics-netstat-tcp.rb fails when IPv6 is disabled #44

Closed MattMencel closed 7 years ago

MattMencel commented 8 years ago

Check failed to run: No such file or directory @ rb_sysopen - /proc/net/tcp6

I opened a PR to fix this.

majormoses commented 7 years ago

@MattMencel I don't see an open pr should this be closed?

MattMencel commented 7 years ago

Already merged...

https://github.com/sensu-plugins/sensu-plugins-network-checks/pull/45

deepakdeore2004 commented 6 years ago

has this issue fixed? I am getting same error:

$ cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.9 (Santiago)

$ sudo /opt/sensu/embedded/bin/metrics-netstat-tcp.rb Check failed to run: No such file or directory @ rb_sysopen - /proc/net/tcp6, ["/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-network-checks-3.1.1/bin/metrics-netstat-tcp.rb:88:ininitialize'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-network-checks-3.1.1/bin/metrics-netstat-tcp.rb:88:in open'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-network-checks-3.1.1/bin/metrics-netstat-tcp.rb:88:innetstat'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-network-checks-3.1.1/bin/metrics-netstat-tcp.rb:114:in run'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugin-1.4.5/lib/sensu-plugin/cli.rb:58:inblock in '"]`

majormoses commented 6 years ago

did you try to disable ipv6 with the option added in that PR? Please include the full command you are running.

deepakdeore2004 commented 6 years ago

just tried "--disabletcp6" and it worked