sensu-plugins / sensu-plugins-graphite

This plugin provides native Graphite instrumentation for monitoring, including: replication status, various Graphite data queries, mutators, and handlers
http://sensu-plugins.io
MIT License
22 stars 45 forks source link

Wrong version of JSON gem loaded. #77

Open genadipost opened 5 years ago

genadipost commented 5 years ago

Hi, i have installed the plugin:

gem install sensu-plugins-graphite

Now i'm attmpting to run check-graphite-stats.rb but i get the following error:

root@830a47edbfa3:/sensu-plugins-graphite# check-graphite-stats.rb
/opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:2278:in `check_version_conflict': can't activate json-1.8.6, already activated json-2.0.4 (Gem::LoadError)
    from /opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1404:in `activate'
    from /opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:89:in `block in require'
    from /opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:88:in `each'
    from /opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:88:in `require'
    from /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-graphite-3.1.1/bin/check-graphite-stats.rb:35:in `<top (required)>'
    from /opt/sensu/embedded/bin/check-graphite-stats.rb:22:in `load'
    from /opt/sensu/embedded/bin/check-graphite-stats.rb:22:in `<main>'

Same happens when i run mutator-graphite.rb:

root@830a47edbfa3:/sensu-plugins-graphite# mutator-graphite.rb
/opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:2278:in `check_version_conflict': can't activate json-1.8.6, already activated json-2.0.4 (Gem::LoadError)
    from /opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1404:in `activate'
    from /opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:89:in `block in require'
    from /opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:88:in `each'
    from /opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:88:in `require'
    from /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-graphite-3.1.1/bin/mutator-graphite.rb:35:in `<top (required)>'
    from /opt/sensu/embedded/bin/mutator-graphite.rb:22:in `load'
    from /opt/sensu/embedded/bin/mutator-graphite.rb:22:in `<main>'

It look like https://github.com/sensu-plugins/sensu-plugins-graphite/issues/61 even though the issue is solved.