sensu-plugins / sensu-plugins-hipchat

Handlers for Hipchat
http://sensu-plugins.io
MIT License
1 stars 16 forks source link

Fix warnings #14

Closed multani closed 6 years ago

multani commented 6 years ago

Pull Request Checklist

Fixes #9

General

Purpose

Fix some runtime warnings. Test artifact:

Before:

$ cat <<EOF | bundle exec bin/handler-hipchat.rb
{
  "client": {
    "name": "client"
  },
  "check": {
    "status": 1,
    "name": "name",
    "source": "source",
    "output": "Hello, warning"
  }
}
EOF

warning: event filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin
connection refused attempting to query the sensu api for a stash
connection refused attempting to query the sensu api for a stash
connection refused attempting to query the sensu api for a stash
warning: occurrence filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin
bin/handler-hipchat.rb:87:in `handle': Object#timeout is deprecated, use Timeout.timeout instead.
$

After:

$ cat <<EOF | bundle exec bin/handler-hipchat.rb
{
  "client": {
    "name": "client"
  },
  "check": {
    "status": 1,
    "name": "name",
    "source": "source",
    "output": "Hello, warning"
  }
}
EOF
$

(and yes, the message still arrives in Hipchat :p )

Known Compatibility Issues

The sensu-plugin gem has been updated, but I don't think what this handler does with it should break anything.

majormoses commented 6 years ago

released: https://rubygems.org/gems/sensu-plugins-hipchat/versions/3.0.0