sensu-plugins-elasticsearch
sensu-plugins-elasticsearch copied to clipboard
check-es-cluster-health warning ::Fixnum
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
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
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.
#73 for adding tests.