vaimo-messages-handler 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/send-message.rb +7 -5
- data/lib/vaimo-messages-handler/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98cfb9be60295cd43df33e78edaeab9dce0975dd
|
4
|
+
data.tar.gz: fc9e3553dba97c1f56c2be75a33f88d6c1396dab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14905127a04f9875771a9231e112a8b3d6c769ef09a1aa938cacc573d6740dc236ec9fed44bd3c14b378b5b6f3b140c9eb2bbd5cef32c9ff3f3354e2882d19ec
|
7
|
+
data.tar.gz: f9a7bbe42fff773c8b14ebf09bf865f60c098a2ccf5eb694df6b099195f7f676d667abfa5a67e8be7caeb829660a969f3e5d1f27b4caf69e37b29ebc3ff74eca
|
data/bin/send-message.rb
CHANGED
@@ -128,15 +128,16 @@ log = Logger.new('/tmp/sensu-messages-handler.log')
|
|
128
128
|
log.level = Logger::INFO
|
129
129
|
|
130
130
|
begin
|
131
|
-
|
131
|
+
raw_data = STDIN.read
|
132
|
+
event = JSON.parse(raw_data)
|
132
133
|
|
133
134
|
sensu_settings
|
134
135
|
messages_settings = sensu_setting('messages')
|
135
136
|
|
136
137
|
args = {
|
137
|
-
server: event[
|
138
|
-
component: event[
|
139
|
-
level: messages_level(event[
|
138
|
+
server: event['client']['name'],
|
139
|
+
component: event['check']['name'],
|
140
|
+
level: messages_level(event['check']['status'])
|
140
141
|
}
|
141
142
|
|
142
143
|
post_args = messages_post_args(args, messages_settings)
|
@@ -144,9 +145,10 @@ begin
|
|
144
145
|
messages_send(post_args, messages_settings)
|
145
146
|
rescue => e
|
146
147
|
open('/tmp/sensu-messages-handler.data', 'w') do |f|
|
147
|
-
f.puts
|
148
|
+
f.puts raw_data
|
148
149
|
end
|
149
150
|
|
150
151
|
log.error "Messages Error: #{e}"
|
152
|
+
log.error "Messages Trace: #{e.backtrace}"
|
151
153
|
end
|
152
154
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vaimo-messages-handler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Margus Heinmaa
|
@@ -183,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
183
|
version: '0'
|
184
184
|
requirements: []
|
185
185
|
rubyforge_project:
|
186
|
-
rubygems_version: 2.5.2.
|
186
|
+
rubygems_version: 2.5.2.1
|
187
187
|
signing_key:
|
188
188
|
specification_version: 4
|
189
189
|
summary: Sensu plugins for Messages handling
|