sensu-plugins / sensu-plugins-kannel

Sensu Kannel Plugins
http://sensu-plugins.io
MIT License
1 stars 6 forks source link

wrong element type nil #6

Open jleonardorc opened 6 years ago

jleonardorc commented 6 years ago

https://github.com/sensu-plugins/sensu-plugins-kannel/blob/986af601626adf77a6c720f488885e919397974d/bin/metrics-kannel.rb#L85

In my kannel install this line outputs:

/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-kannel-1.0.0/bin/metrics-kannel.rb:85: warning: wrong element type nil at 0 (expected array)

For my works adding a splat operator:

Hash[*REXML::XPath.each(document, '//smsc').map do |smsc|

I hope it helps

markboots commented 4 years ago

👍 Same issue and same solution for us.