sensu-plugins-ecityruf 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -2
- data/bin/console +3 -3
- data/bin/handler-ecityruf.rb +9 -9
- data/lib/sensu/plugins/ecityruf/version.rb +1 -1
- data/lib/sensu/plugins/ecityruf.rb +1 -1
- metadata +9 -71
- data/.gitignore +0 -11
- data/.project +0 -17
- data/.pydevproject +0 -8
- data/Gemfile +0 -6
- data/Rakefile +0 -38
- data/sensu-plugins-ecityruf.gemspec +0 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d899a62f745a9184b1ce274dd1c4e68face4f02
|
4
|
+
data.tar.gz: d71a9462617deb49003fa71a49e2177315efeaa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e36a9cd82d94f588d53b578893458a9e0440dcd099c7893118525fea80a3a6c3eb807d168a7158b2cebdf11aa011fd25a654503a5ef58a154a0f0b0c5f002fc2
|
7
|
+
data.tar.gz: 1e3cad8d71e2182d604548c4833c0680bb06cacc60fd33a2cc08a7a2ba89af9771739f69351c0479f7037a9fc2183373b4b9656b0fbd7255544b53033612484f
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Sensu::Plugins::Ecityruf
|
2
2
|
|
3
|
-
Sensu Handler to send messages to pagers using eCityruf
|
3
|
+
Sensu Handler to send messages to pagers using eCityruf with a `Sammelrufnummer`.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -23,10 +23,13 @@ Or install it yourself as:
|
|
23
23
|
```
|
24
24
|
{
|
25
25
|
"ecityruf": {
|
26
|
-
"number": "5200139"
|
26
|
+
"number": "5200139",
|
27
|
+
"language": "de",
|
28
|
+
"url": "https://inetgateway.emessage.de/cgi-bin/funkruf2.cgi"
|
27
29
|
}
|
28
30
|
}
|
29
31
|
```
|
32
|
+
`language` and `url` are optional. See default values in the example above.
|
30
33
|
|
31
34
|
## Development
|
32
35
|
|
data/bin/console
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'sensu/plugins/ecityruf'
|
5
5
|
|
6
6
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +10,5 @@ require "sensu/plugins/ecityruf"
|
|
10
10
|
# require "pry"
|
11
11
|
# Pry.start
|
12
12
|
|
13
|
-
require
|
13
|
+
require 'irb'
|
14
14
|
IRB.start
|
data/bin/handler-ecityruf.rb
CHANGED
@@ -20,35 +20,35 @@ class Ecityruf < Sensu::Handler
|
|
20
20
|
|
21
21
|
def handle
|
22
22
|
apiurl = settings['ecityruf']['url'] || 'https://inetgateway.emessage.de/cgi-bin/funkruf2.cgi'
|
23
|
-
|
23
|
+
|
24
24
|
params = {
|
25
25
|
'action' => 'SendMessage',
|
26
26
|
'class' => '4',
|
27
27
|
'language' => settings['ecityruf']['language'] || 'de',
|
28
28
|
'number' => settings['ecityruf']['number'],
|
29
|
-
#'number' => '5200139',
|
30
29
|
'lengthAlert' => '',
|
31
30
|
'service' => '1',
|
32
31
|
'message' => event_name + '/' + @event['check']['output']
|
33
|
-
#'message' => 'https2'
|
34
32
|
}
|
35
|
-
|
33
|
+
|
36
34
|
uri = URI.parse(apiurl)
|
37
35
|
uri.query = URI.encode_www_form(params)
|
38
|
-
|
36
|
+
|
39
37
|
begin
|
40
38
|
Timeout.timeout(5) do
|
41
|
-
Net::HTTP.start(uri.host,
|
42
|
-
|
39
|
+
Net::HTTP.start(uri.host,
|
40
|
+
uri.port,
|
41
|
+
use_ssl: uri.scheme == 'https',
|
42
|
+
verify_mode: OpenSSL::SSL::VERIFY_NONE) do |http|
|
43
43
|
request = Net::HTTP::Get.new uri
|
44
|
-
|
44
|
+
|
45
45
|
response = http.request request
|
46
46
|
puts response.code
|
47
47
|
end
|
48
48
|
puts 'ecityruf -- sent alert to number: ' + params['number'] + '.'
|
49
49
|
end
|
50
50
|
rescue Timeout::Error
|
51
|
-
puts 'ecityruf --
|
51
|
+
puts 'ecityruf -- time out while attempting to alert about: ' + event_name
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
@@ -1 +1 @@
|
|
1
|
-
require
|
1
|
+
require 'sensu/plugins/ecityruf/version'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-ecityruf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hauke Altmann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|
@@ -38,34 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.16'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rake
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '10.0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '10.0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: github-markup
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '1.3'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '1.3'
|
69
41
|
- !ruby/object:Gem::Dependency
|
70
42
|
name: pry
|
71
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,61 +53,33 @@ dependencies:
|
|
81
53
|
- !ruby/object:Gem::Version
|
82
54
|
version: '0.10'
|
83
55
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: 0.32.1
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 0.32.1
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rspec
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '3.1'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '3.1'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: redcarpet
|
56
|
+
name: rake
|
113
57
|
requirement: !ruby/object:Gem::Requirement
|
114
58
|
requirements:
|
115
59
|
- - "~>"
|
116
60
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
61
|
+
version: '10.0'
|
118
62
|
type: :development
|
119
63
|
prerelease: false
|
120
64
|
version_requirements: !ruby/object:Gem::Requirement
|
121
65
|
requirements:
|
122
66
|
- - "~>"
|
123
67
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
68
|
+
version: '10.0'
|
125
69
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
70
|
+
name: rubocop
|
127
71
|
requirement: !ruby/object:Gem::Requirement
|
128
72
|
requirements:
|
129
73
|
- - "~>"
|
130
74
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
75
|
+
version: 0.32.1
|
132
76
|
type: :development
|
133
77
|
prerelease: false
|
134
78
|
version_requirements: !ruby/object:Gem::Requirement
|
135
79
|
requirements:
|
136
80
|
- - "~>"
|
137
81
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
82
|
+
version: 0.32.1
|
139
83
|
description: Handler to allow to alert connected pagers over ecityruf on events.
|
140
84
|
email:
|
141
85
|
- hauke.altmann@aboutsource.net
|
@@ -144,19 +88,13 @@ executables:
|
|
144
88
|
extensions: []
|
145
89
|
extra_rdoc_files: []
|
146
90
|
files:
|
147
|
-
- ".gitignore"
|
148
|
-
- ".project"
|
149
|
-
- ".pydevproject"
|
150
|
-
- Gemfile
|
151
91
|
- LICENSE.txt
|
152
92
|
- README.md
|
153
|
-
- Rakefile
|
154
93
|
- bin/console
|
155
94
|
- bin/handler-ecityruf.rb
|
156
95
|
- bin/setup
|
157
96
|
- lib/sensu/plugins/ecityruf.rb
|
158
97
|
- lib/sensu/plugins/ecityruf/version.rb
|
159
|
-
- sensu-plugins-ecityruf.gemspec
|
160
98
|
homepage: https://www.aboutsource.net
|
161
99
|
licenses:
|
162
100
|
- MIT
|
@@ -169,7 +107,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
169
107
|
requirements:
|
170
108
|
- - ">="
|
171
109
|
- !ruby/object:Gem::Version
|
172
|
-
version: 2.
|
110
|
+
version: 2.1.0
|
173
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
112
|
requirements:
|
175
113
|
- - ">="
|
data/.gitignore
DELETED
data/.project
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<projectDescription>
|
3
|
-
<name>sensu-plugins-ecityruf</name>
|
4
|
-
<comment></comment>
|
5
|
-
<projects>
|
6
|
-
</projects>
|
7
|
-
<buildSpec>
|
8
|
-
<buildCommand>
|
9
|
-
<name>org.python.pydev.PyDevBuilder</name>
|
10
|
-
<arguments>
|
11
|
-
</arguments>
|
12
|
-
</buildCommand>
|
13
|
-
</buildSpec>
|
14
|
-
<natures>
|
15
|
-
<nature>org.python.pydev.pythonNature</nature>
|
16
|
-
</natures>
|
17
|
-
</projectDescription>
|
data/.pydevproject
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
-
<?eclipse-pydev version="1.0"?><pydev_project>
|
3
|
-
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
|
4
|
-
<path>/${PROJECT_DIR_NAME}</path>
|
5
|
-
</pydev_pathproperty>
|
6
|
-
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python interpreter</pydev_property>
|
7
|
-
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
|
8
|
-
</pydev_project>
|
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
require 'bundler/gem_tasks'
|
2
|
-
require 'github/markup'
|
3
|
-
require 'redcarpet'
|
4
|
-
require 'rspec/core/rake_task'
|
5
|
-
require 'rubocop/rake_task'
|
6
|
-
require 'yard'
|
7
|
-
require 'yard/rake/yardoc_task'
|
8
|
-
|
9
|
-
YARD::Rake::YardocTask.new do |t|
|
10
|
-
OTHER_PATHS = %w().freeze
|
11
|
-
t.files = ['lib/**/*.rb', 'bin/**/*.rb', OTHER_PATHS]
|
12
|
-
t.options = %w(--markup-provider=redcarpet --markup=markdown --main=README.md --files CHANGELOG.md)
|
13
|
-
end
|
14
|
-
|
15
|
-
RuboCop::RakeTask.new
|
16
|
-
|
17
|
-
RSpec::Core::RakeTask.new(:spec) do |r|
|
18
|
-
r.pattern = FileList['**/**/*_spec.rb']
|
19
|
-
end
|
20
|
-
|
21
|
-
desc 'Make all plugins executable'
|
22
|
-
task :make_bin_executable do
|
23
|
-
`chmod -R +x bin/*`
|
24
|
-
end
|
25
|
-
|
26
|
-
desc 'Test for binstubs'
|
27
|
-
task :check_binstubs do
|
28
|
-
bin_list = Gem::Specification.load('sensu-plugins-ecityruf.gemspec').executables
|
29
|
-
bin_list.each do |b|
|
30
|
-
`which #{ b }`
|
31
|
-
unless $CHILD_STATUS.success?
|
32
|
-
puts "#{b} was not a binstub"
|
33
|
-
exit
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
task default: [:spec, :make_bin_executable, :yard, :rubocop, :check_binstubs]
|
@@ -1,37 +0,0 @@
|
|
1
|
-
lib = File.expand_path("../lib", __FILE__)
|
2
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
|
4
|
-
require 'date'
|
5
|
-
require_relative 'lib/sensu/plugins/ecityruf'
|
6
|
-
|
7
|
-
Gem::Specification.new do |spec|
|
8
|
-
spec.name = "sensu-plugins-ecityruf"
|
9
|
-
spec.version = Sensu::Plugins::Ecityruf::VERSION
|
10
|
-
spec.authors = ["Hauke Altmann"]
|
11
|
-
spec.email = ["hauke.altmann@aboutsource.net"]
|
12
|
-
spec.executables = Dir.glob('bin/**/*.rb').map { |file| File.basename(file) }
|
13
|
-
spec.files = Dir.glob('{bin,lib}/**/*') + %w(LICENSE.txt README.md)
|
14
|
-
spec.platform = Gem::Platform::RUBY
|
15
|
-
spec.require_paths = ['lib']
|
16
|
-
spec.required_ruby_version = '>= 2.0.0'
|
17
|
-
|
18
|
-
spec.summary = "Sensu handler for ecityruf service"
|
19
|
-
spec.description = "Handler to allow to alert connected pagers over ecityruf on events."
|
20
|
-
spec.homepage = "https://www.aboutsource.net"
|
21
|
-
spec.license = "MIT"
|
22
|
-
|
23
|
-
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
24
|
-
f.match(%r{^(test|spec|features)/})
|
25
|
-
end
|
26
|
-
|
27
|
-
spec.add_runtime_dependency 'sensu-plugin', '~> 1.2'
|
28
|
-
|
29
|
-
spec.add_development_dependency "bundler", "~> 1.16"
|
30
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
31
|
-
spec.add_development_dependency 'github-markup', '~> 1.3'
|
32
|
-
spec.add_development_dependency 'pry', '~> 0.10'
|
33
|
-
spec.add_development_dependency 'rubocop', '~> 0.32.1'
|
34
|
-
spec.add_development_dependency 'rspec', '~> 3.1'
|
35
|
-
spec.add_development_dependency 'redcarpet', '~> 3.2'
|
36
|
-
spec.add_development_dependency 'yard', '~> 0.8'
|
37
|
-
end
|