sensu-plugins-elasticsearch icon indicating copy to clipboard operation
sensu-plugins-elasticsearch copied to clipboard

check-es-cluster-health warning ::Fixnum

Open jothoma1 opened this issue 7 years ago • 3 comments

Hello, i'm using your plugins with sensu 1.0 and the check-es-cluster-health.rb return a warning :

/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/elasticsearch-transport-1.0.18/lib/elasticsearch/transport/transport/base.rb:52: warning: constant ::Fixnum is deprecated /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/elasticsearch-transport-1.0.18/lib/elasticsearch/transport/transport/base.rb:54: warning: constant ::Fixnum is deprecated ESClusterHealth CRITICAL: Cluster state is Red

Thanks in advance

jothoma1 avatar Jul 20 '17 09:07 jothoma1

This will be affecting anyone using this plugin on Ruby 2.4.0; caused by the dependency on the elasticsearch gem. It looks like it's already been fixed upstream however this plugin pins an older version of the gem.

@majormoses You're probably already aware but one to note for the 2.4.1 testing -- To resolve this issue I assume it'll require bumping to use the latest major release (5.) of the elasticsearch gem.

In the meantime @jothoma1 you could export the below to suppress these warnings:

RUBYOPT=-W0

i.e.

command 'RUBYOPT=-W0 /opt/sensu/embedded/bin/check-es-cluster-status.rb' 

EDIT: I see related discussion https://github.com/sensu-plugins/sensu-plugins-elasticsearch/issues/48

Evesy avatar Jul 24 '17 20:07 Evesy

I checked and we can bump to 2.x when I have some time I can try bumping this I am more concerned about the lack of testing in this plugin so it will require lots of testing against multiple versions of ES so we know what breaks on what versions.

majormoses avatar Jul 24 '17 21:07 majormoses

#73 for adding tests.

eheydrick avatar Jul 26 '17 07:07 eheydrick