sensu-plugins / sensu-plugins-mailer

This plugin is an email handler for Sensu.

Home Page:http://sensu-plugins.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Object#timeout is deprecated, use Timeout.timeout

Salamek opened this issue · comments

{"timestamp":"2016-04-14T08:41:34.612166+0200","level":"info","message":"handler output","handler":{"type":"pipe","command":"handler-mailer.rb","json_config":"mailer.json","name":"mailer"},"output":["/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:134:in block in filter_silenced': Object#timeout is deprecated, use Timeout.timeout instead.\n/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:134:inblock in filter_silenced': Object#timeout is deprecated, use Timeout.timeout instead.\n/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:134:in block in filter_silenced': Object#timeout is deprecated, use Timeout.timeout instead.\n/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-0.2.0/bin/handler-mailer.rb:215:inhandle': Object#timeout is deprecated, use Timeout.timeout instead.\nmail -- timed out while attempting to create an incident -- nemec.eu/mem-percent\n"]}

Would be great to fix this. Care to create a PR?

Same here:

{"timestamp":"2016-06-08T17:23:30.243635-0700","level":"info","message":"handler output","handler":{"type":"pipe","command":"/opt/sensu/embedded/bin/handler-mailer.rb","name":"mailer"},"output":["/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:134:in `block in filter_silenced': Object#timeout is deprecated, use Timeout.timeout instead.\n/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:134:in `block in filter_silenced': Object#timeout is deprecated, use Timeout.timeout instead.\n/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:134:in `block in filter_silenced': Object#timeout is deprecated, use Timeout.timeout instead.\n/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-0.2.0/bin/handler-mailer.rb:215:in `handle': Object#timeout is deprecated, use Timeout.timeout instead.\nmail -- sent alert for server_hostname/keepalive to redacted@company.com\n"]}

@asciifaceman it's a deprecation from ruby 2.3.0 feel free to downgrade your ruby

fixed via adding Timeout.

commented

does this have to be released in the next version? we are at 0.3.1, i assume this fix will be put into 0.3.2?

or is there another way i can get this update

EDIT: I guess this isn't a "blocker".. no rush on releasing it. it won't actually cause errors.

hi @ddavison, new release with the timeout fixes will be out soon.

1.0.0 has been released to rubygems.