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-sockstat.rb is broken in 5.0.0 #131

Closed rwky closed 7 months ago

rwky commented 4 years ago

Throws an error

 /opt/sensu/embedded/bin/metrics-sockstat.rb 
/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-network-checks-5.0.0/bin/metrics-sockstat.rb:38:in `<class:MetricsSockstat>': uninitialized constant MetricsSockstat::Socket (NameError)
        from /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-network-checks-5.0.0/bin/metrics-sockstat.rb:33:in `<top (required)>'
        from /opt/sensu/embedded/bin/metrics-sockstat.rb:23:in `load'
        from /opt/sensu/embedded/bin/metrics-sockstat.rb:23:in `<main>'

Previous versions work fine.

nixwiz commented 4 years ago

@asanchez1978 this was from your commit 6c7f9838 that was just rolled out in this release.

sensu-discourse commented 4 years ago

This issue has been mentioned on Sensu Community. There might be relevant details there:

https://discourse.sensu.io/t/class-metricssockstat-uninitialized-constant-metricssockstat-socket-nameerror/1634/2

soichih commented 4 years ago

For anyone trying to figure out how to downgrade from 5.0.0 to 4.0.0, here is what I did

/opt/sensu/embedded/bin/gem uninstall sensu-plugins-network-checks 
/opt/sensu/embedded/bin/gem install sensu-plugins-network-checks -v 4.0.0