sensu-plugins / sensu-plugins-docker

This plugin provides native Docker instrumentation for monitoring and metrics collection, including: container status, container number, and container metrics via `docker ps`.
http://sensu-plugins.io
MIT License
35 stars 57 forks source link

Could not find a valid gem 'sys-proctable' (= 0.9.8) in any repository #68

Open phynias opened 6 years ago

phynias commented 6 years ago
gem install sensu-plugins-docker
ERROR:  Could not find a valid gem 'sys-proctable' (= 0.9.8) in any repository
ERROR:  Possible alternatives: sys-proctable

looks like the verison of sys-proctable you are using isn't there anymore, and it won't run on the newer version either.

ruby metrics-docker-stats.rb
/usr/lib/ruby/2.4.0/rubygems/dependency.rb:310:in `to_specs': Could not find 'sys-proctable' (= 0.9.8) - did find: [sys-proctable-1.2.1] (Gem::MissingSpecVersionError)
Checked in 'GEM_PATH=/root/.gem/ruby/2.4.0:/usr/lib/ruby/gems/2.4.0', execute `gem env` for more information
        from /usr/lib/ruby/2.4.0/rubygems/specification.rb:1445:in `block in activate_dependencies'
        from /usr/lib/ruby/2.4.0/rubygems/specification.rb:1434:in `each'
        from /usr/lib/ruby/2.4.0/rubygems/specification.rb:1434:in `activate_dependencies'
        from /usr/lib/ruby/2.4.0/rubygems/specification.rb:1416:in `activate'
        from /usr/lib/ruby/2.4.0/rubygems.rb:220:in `rescue in try_activate'
        from /usr/lib/ruby/2.4.0/rubygems.rb:213:in `try_activate'
        from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:126:in `rescue in require'
        from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:39:in `require'
        from metrics-docker-stats.rb:41:in `<main>'
(failed reverse-i-search)`insall': cd /usr/lib/ruby/gems/2.4.0/gems/sensu-plugins-docker-3.1.1/lib/sensu-plug^Cs-docker
phynias commented 6 years ago

figured out my own you need the platform for version older than 1.1.5 gem install sys-proctable --platform linux -v 0.9.8

phynias commented 6 years ago

never mind that doesnt work either. /usr/lib/ruby/2.4.0/rubygems/dependency.rb:310:into_specs': Could not find 'sys-proctable' (= 0.9.8) - did find: [sys-proctable-0.9.8-universal-linux] (Gem::MissingSpecVersionError)`

majormoses commented 6 years ago

Hm I see that version still on rubygems: https://rubygems.org/gems/sys-proctable/versions/0.9.8-universal-linux and I can install it:

$ gem install sensu-plugins-docker
Fetching: sys-proctable-0.9.8-universal-linux.gem (100%)
Successfully installed sys-proctable-0.9.8-universal-linux
Fetching: net_http_unix-0.2.2.gem (100%)
Successfully installed net_http_unix-0.2.2
Fetching: sensu-plugins-docker-3.1.1.gem (100%)
You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu
Successfully installed sensu-plugins-docker-3.1.1
Parsing documentation for sys-proctable-0.9.8-universal-linux
Installing ri documentation for sys-proctable-0.9.8-universal-linux
Parsing documentation for net_http_unix-0.2.2
Installing ri documentation for net_http_unix-0.2.2
Parsing documentation for sensu-plugins-docker-3.1.1
Installing ri documentation for sensu-plugins-docker-3.1.1
Done installing documentation for sys-proctable, net_http_unix, sensu-plugins-docker after 0 seconds
3 gems installed
majormoses commented 6 years ago

I am guessing this may be contributing to your issue:

GEM_PATH=/root/.gem/ruby/2.4.0:/usr/lib/ruby/gems/2.4.0

What you might try:

One final plea if this is for a production environment please pin your gem versions