sensu-plugins-ecityruf 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/handler-ecityruf.rb +8 -13
- data/lib/sensu/plugins/ecityruf/version.rb +1 -1
- metadata +1 -3
- data/bin/console +0 -14
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd0d1817fb166358acb88938ed4b81edc1966c2f
|
4
|
+
data.tar.gz: 7ea338a3231ecb40e40ec19cdadc4afe431320be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4b328f20034bef9ca78868d3b30f8abf2486581f316442d189b5c3d0a5910d2c51556dd2d696f08a183206418b43589a5a9b66f5b2b05b396463603de88965d
|
7
|
+
data.tar.gz: e02c34019515f4c2a2bd4257664468f22ea70a662ef0c903663bce10dc5fe90e65232e512f8c1592429b0d1441e79704318e81b3eeb0ac881539fd2b5758f35b
|
data/bin/handler-ecityruf.rb
CHANGED
@@ -34,21 +34,16 @@ class Ecityruf < Sensu::Handler
|
|
34
34
|
uri = URI.parse(apiurl)
|
35
35
|
uri.query = URI.encode_www_form(params)
|
36
36
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
verify_mode: OpenSSL::SSL::VERIFY_NONE) do |http|
|
43
|
-
request = Net::HTTP::Get.new uri
|
37
|
+
Timeout.timeout(60) do
|
38
|
+
Net::HTTP.start(uri.host,
|
39
|
+
uri.port,
|
40
|
+
use_ssl: uri.scheme == 'https') do |http|
|
41
|
+
request = Net::HTTP::Get.new uri
|
44
42
|
|
45
|
-
|
46
|
-
|
47
|
-
end
|
48
|
-
puts 'ecityruf -- sent alert ' + event_name + ' to number ' + params['number'] + '.'
|
43
|
+
response = http.request request
|
44
|
+
puts response.code
|
49
45
|
end
|
50
|
-
|
51
|
-
puts 'ecityruf -- time out while attempting to alert about ' + event_name + '.'
|
46
|
+
puts 'ecityruf -- sent alert ' + event_name + ' to number ' + params['number'] + '.'
|
52
47
|
end
|
53
48
|
end
|
54
49
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-ecityruf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hauke Altmann
|
@@ -90,9 +90,7 @@ extra_rdoc_files: []
|
|
90
90
|
files:
|
91
91
|
- LICENSE.txt
|
92
92
|
- README.md
|
93
|
-
- bin/console
|
94
93
|
- bin/handler-ecityruf.rb
|
95
|
-
- bin/setup
|
96
94
|
- lib/sensu/plugins/ecityruf.rb
|
97
95
|
- lib/sensu/plugins/ecityruf/version.rb
|
98
96
|
homepage: https://www.aboutsource.net
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'bundler/setup'
|
4
|
-
require 'sensu/plugins/ecityruf'
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require 'irb'
|
14
|
-
IRB.start
|