sensu-plugins / sensu-plugins-elasticsearch

This plugin provides native ElasticSearch instrumentation for monitoring and metrics collection, including: service health and metrics for cluster, node, and more.
http://sensu-plugins.io
MIT License
32 stars 76 forks source link

Compatibility with sensu-plugin 2.0.0 #71

Open hwatts opened 7 years ago

hwatts commented 7 years ago

I'm getting an error running checks with the latest sensu plugin version. It works if the plugin's downgraded to 1.4.5.

Are there any plans to support this?

/opt/sensu/embedded/bin/ruby /etc/sensu/plugins/elasticsearch/check-es-cluster-health.rb /opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:2288:in raise_if_conflicts': Unable to activate sensu-plugins-elasticsearch-1.1.3, because sensu-plugin-2.0.0 conflicts with sensu-plugin (~> 1.2) (Gem::ConflictError)

majormoses commented 7 years ago

@hwatts thanks for reporting this, quite a few of the checks need to be updated to use 2.x @mattyjones any idea on when we are looking to start bumping the requirements on sensu-plugin?

eheydrick commented 7 years ago

@hwatts I see you're executing the check outside the embedded ruby dir. If you execute it using the binstub in the embedded ruby (e.g. /opt/sensu/embedded/bin/check-es-cluster-health.rb) it'll load with sensu-plugin 1.4.5 and execute properly. sensu 0.29 includes both sensu-plugin 1.4.5 and 2.x so that should be all you have to do.

eheydrick commented 7 years ago

@majormoses i think given that 0.29+ ships with 2.x we can start targeting it. We'll want to bump it in a major release since there are some potentially breaking changes. @cwjohnston any thoughts?

majormoses commented 7 years ago

As a prerequisite to cutting from 1 to 2 I am going around to all the repos in 2 passes [1] to ensure ruby 2.4 support as it will be a nightmare if only some of the gems are bumped to 2.x and will leave people in very broken states where they can only monitor half (probably less tbh) of their infra.

[1] Adding testing for install time in ruby 2.4 (in progress, the gems listed do not in) and after that is complete will need to run through all repos and add support, testing, etc to be able to verify that it can work on both rubies 2.3 and 2.4 which will be a ton of work and may require breaking changes. After that the work for bumping sensu-plugin to 2.x can begin which will also be a breaking change. I see for sure one or two breaking changes/releases per plugin required to get here. This will not be quick and I don't yet have a timeline but you can check the progress on the super issue I created here: https://github.com/sensu-plugins/sensu-plugins-feature-requests/issues/26 which should have links to the dependent work I outlined above and will have much of the work linked where possible. I honestly recommend to anyone using sensu to not upgrade at this time past 0.28, pin their gems with non pessimistic versions, and give us time to stabilize the plugins and extension repos before charging ahead. A monitoring server is not useful unless you can actually have it monitor all the things you need.