sensu-plugins-logstash 0.0.1.alpha.2 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 10293bb4b9514dea1d93aade70322b35374aed71
4
- data.tar.gz: 4eb7c88d2a762c70bacc2189122ee32cb130bd42
3
+ metadata.gz: e86e7b3fee2d7e7a77cabd432d8d110dc6fadbff
4
+ data.tar.gz: 9f0a38ef7fd256e93389d8f2524caf8df873da1a
5
5
  SHA512:
6
- metadata.gz: e32c270edcdfa9070aadfda2f54faf12e8c30c4f14a1a14e6f629c9afe58096bb63c397de92d379cab758b59dcd1f48f905c1b4819da42586b20a56b8d3a38b0
7
- data.tar.gz: f23683a23032ba0ade5052a1a648efd66ef401a87e262ccde06b685f7bc7f78c5acdc44fd8ddf978a49435a5448901069b8cbd7631695571785d52b4cc7b9f90
6
+ metadata.gz: 59a77730b080683233cd9b880acbe386b53fec6b933e7f70a3cb5351ba2f6d2c391433e90ebe6619109fec2ef5364f8401b91ae7a93cdabe4cc601a3b2cdee3e
7
+ data.tar.gz: be8b56f33193f487017a2fa1af754a398f3e9ab907abccb96b1a4787673c45a46ffad90a58e0b8891d26bb4f9a1af9bccc1eafb222c1b4da93dada57d74b40a5
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,7 +1,13 @@
1
- #### 0.0.1.alpha.1
1
+ #Change Log
2
+ This project adheres to [Semantic Versioning](http://semver.org/).
2
3
 
3
- * initial GH release, identical to community repo
4
+ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
5
+
6
+ ## Unreleased][unreleased]
7
+
8
+ ## 0.0.1 - 2015-04-30
9
+
10
+ ### Added
11
+ - initial release
4
12
 
5
- #### 0.0.1.alpha.2
6
13
 
7
- * pin runtime dependencies
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015 devops@yieldbot.com
1
+ Copyright (c) 2015 Sensu-Plugins
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-logstash/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-logstash)
6
6
  [![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-logstash/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-logstash)
7
7
  [![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-logstash.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-logstash)
8
- ## Functionality
8
+ [![Codeship Status for sensu-plugins/sensu-plugins-logstash](https://codeship.com/projects/a27fccf0-db96-0132-cb23-0eed4ec53b27/status?branch=master)](https://codeship.com/projects/79668)
9
9
 
10
10
  ## Functionality
11
11
 
@@ -14,7 +14,7 @@
14
14
 
15
15
  ## Usage
16
16
 
17
- **handler-logstash**
17
+ **handler-logstash**
18
18
  ```
19
19
  {
20
20
  "logstash": {
@@ -28,39 +28,6 @@
28
28
  ```
29
29
  ## Installation
30
30
 
31
- Add the public key (if you haven’t already) as a trusted certificate
32
-
33
- ```
34
- gem cert --add <(curl -Ls https://raw.githubusercontent.com/sensu-plugins/sensu-plugins.github.io/master/certs/sensu-plugins.pem)
35
- gem install sensu-plugins-logstash -P MediumSecurity
36
- ```
37
-
38
- You can also download the key from /certs/ within each repository.
39
-
40
- #### Rubygems
41
-
42
- `gem install sensu-plugins-logstash`
43
-
44
- #### Bundler
45
-
46
- Add *sensu-plugins-logstash* to your Gemfile and run `bundle install` or `bundle update`
47
-
48
- #### Chef
49
-
50
- Using the Sensu **sensu_gem** LWRP
51
- ```
52
- sensu_gem 'sensu-plugins-logstash' do
53
- options('--prerelease')
54
- version '0.0.1'
55
- end
56
- ```
57
-
58
- Using the Chef **gem_package** resource
59
- ```
60
- gem_package 'sensu-plugins-logstash' do
61
- options('--prerelease')
62
- version '0.0.1'
63
- end
64
- ```
31
+ [Installation and Setup](https://github.com/sensu-plugins/documentation/blob/master/user_docs/installation_instructions.md)
65
32
 
66
33
  ## Notes
@@ -21,7 +21,7 @@
21
21
  # USAGE:
22
22
  #
23
23
  # NOTES:
24
- # Heavily inspried (er, copied from) the GELF Handler writeen by
24
+ # Heavily inspried (er, copied from) the GELF Handler written by
25
25
  # Joe Miller.
26
26
  #
27
27
  # LICENSE:
@@ -48,7 +48,20 @@ class LogstashHandler < Sensu::Handler
48
48
  @event['action'].eql?('resolve') ? 'RESOLVE' : 'ALERT'
49
49
  end
50
50
 
51
- def handle
51
+ def event_status
52
+ case @event['check']['status']
53
+ when 0
54
+ 'OK'
55
+ when 1
56
+ 'WARNING'
57
+ when 2
58
+ 'CRITICAL'
59
+ else
60
+ 'unknown'
61
+ end
62
+ end
63
+
64
+ def handle # rubocop:disable all
52
65
  time = Time.now.utc.iso8601
53
66
  logstash_msg = {
54
67
  :@timestamp => time,
@@ -61,7 +74,7 @@ class LogstashHandler < Sensu::Handler
61
74
  :address => @event['client']['address'],
62
75
  :check_name => @event['check']['name'],
63
76
  :command => @event['check']['command'],
64
- :status => @event['check']['status'],
77
+ :status => event_status,
65
78
  :flapping => @event['check']['flapping'],
66
79
  :occurrences => @event['occurrences'],
67
80
  :action => @event['action']
@@ -0,0 +1,28 @@
1
+ require 'json'
2
+
3
+ # encoding: utf-8
4
+ module SensuPluginsLogstash
5
+ # This defines the version of the gem
6
+ module Version
7
+ MAJOR = 0
8
+ MINOR = 0
9
+ PATCH = 1
10
+
11
+ VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
12
+
13
+ NAME = 'sensu-plugins-logstash'
14
+ BANNER = "#{NAME} v%s"
15
+
16
+ module_function
17
+
18
+ def version
19
+ format(BANNER, VER_STRING)
20
+ end
21
+
22
+ def json_version
23
+ {
24
+ 'version' => VER_STRING
25
+ }.to_json
26
+ end
27
+ end
28
+ end
@@ -1,7 +1,15 @@
1
+
2
+ require 'sensu-plugins-logstash/version'
3
+
4
+ # Load the defaults
5
+
1
6
  #
2
- # Set gem version
7
+ # Default class
3
8
  #
4
9
  module SensuPluginsLogstash
5
- # Gem version
6
- VERSION = '0.0.1.alpha.2'
10
+ class << self
11
+ end
12
+
13
+ class << self
14
+ end
7
15
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-logstash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.alpha.2
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
- - Yieldbot, Inc. and contributors
7
+ - Sensu Plugins and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
@@ -30,7 +30,7 @@ cert_chain:
30
30
  8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
31
31
  HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
32
32
  -----END CERTIFICATE-----
33
- date: 2015-03-25 00:00:00.000000000 Z
33
+ date: 2015-05-22 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: sensu-plugin
@@ -78,162 +78,168 @@ dependencies:
78
78
  name: codeclimate-test-reporter
79
79
  requirement: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: '0'
83
+ version: '0.4'
84
84
  type: :development
85
85
  prerelease: false
86
86
  version_requirements: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - '>='
88
+ - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: '0'
90
+ version: '0.4'
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: rubocop
93
93
  requirement: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - '='
95
+ - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: 0.17.0
97
+ version: '0.30'
98
98
  type: :development
99
99
  prerelease: false
100
100
  version_requirements: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - '='
102
+ - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: 0.17.0
104
+ version: '0.30'
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: rspec
107
107
  requirement: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - ~>
109
+ - - "~>"
110
110
  - !ruby/object:Gem::Version
111
111
  version: '3.1'
112
112
  type: :development
113
113
  prerelease: false
114
114
  version_requirements: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - ~>
116
+ - - "~>"
117
117
  - !ruby/object:Gem::Version
118
118
  version: '3.1'
119
119
  - !ruby/object:Gem::Dependency
120
120
  name: bundler
121
121
  requirement: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - ~>
123
+ - - "~>"
124
124
  - !ruby/object:Gem::Version
125
125
  version: '1.7'
126
126
  type: :development
127
127
  prerelease: false
128
128
  version_requirements: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - ~>
130
+ - - "~>"
131
131
  - !ruby/object:Gem::Version
132
132
  version: '1.7'
133
133
  - !ruby/object:Gem::Dependency
134
134
  name: rake
135
135
  requirement: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - ~>
137
+ - - "~>"
138
138
  - !ruby/object:Gem::Version
139
139
  version: '10.0'
140
140
  type: :development
141
141
  prerelease: false
142
142
  version_requirements: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - ~>
144
+ - - "~>"
145
145
  - !ruby/object:Gem::Version
146
146
  version: '10.0'
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: github-markup
149
149
  requirement: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - ~>
151
+ - - "~>"
152
152
  - !ruby/object:Gem::Version
153
153
  version: '1.3'
154
154
  type: :development
155
155
  prerelease: false
156
156
  version_requirements: !ruby/object:Gem::Requirement
157
157
  requirements:
158
- - - ~>
158
+ - - "~>"
159
159
  - !ruby/object:Gem::Version
160
160
  version: '1.3'
161
161
  - !ruby/object:Gem::Dependency
162
162
  name: redcarpet
163
163
  requirement: !ruby/object:Gem::Requirement
164
164
  requirements:
165
- - - ~>
165
+ - - "~>"
166
166
  - !ruby/object:Gem::Version
167
167
  version: '3.2'
168
168
  type: :development
169
169
  prerelease: false
170
170
  version_requirements: !ruby/object:Gem::Requirement
171
171
  requirements:
172
- - - ~>
172
+ - - "~>"
173
173
  - !ruby/object:Gem::Version
174
174
  version: '3.2'
175
175
  - !ruby/object:Gem::Dependency
176
176
  name: yard
177
177
  requirement: !ruby/object:Gem::Requirement
178
178
  requirements:
179
- - - ~>
179
+ - - "~>"
180
180
  - !ruby/object:Gem::Version
181
181
  version: '0.8'
182
182
  type: :development
183
183
  prerelease: false
184
184
  version_requirements: !ruby/object:Gem::Requirement
185
185
  requirements:
186
- - - ~>
186
+ - - "~>"
187
187
  - !ruby/object:Gem::Version
188
188
  version: '0.8'
189
189
  - !ruby/object:Gem::Dependency
190
190
  name: pry
191
191
  requirement: !ruby/object:Gem::Requirement
192
192
  requirements:
193
- - - ~>
193
+ - - "~>"
194
194
  - !ruby/object:Gem::Version
195
195
  version: '0.10'
196
196
  type: :development
197
197
  prerelease: false
198
198
  version_requirements: !ruby/object:Gem::Requirement
199
199
  requirements:
200
- - - ~>
200
+ - - "~>"
201
201
  - !ruby/object:Gem::Version
202
202
  version: '0.10'
203
- description: Sensu Plugins for Logstash
204
- email: <sensu-users@googlegroups.com>
205
- executables:
206
- - handler-logstash.rb
203
+ description: Sensu plugins for working with logstash
204
+ email: "<sensu-users@googlegroups.com>"
205
+ executables: []
207
206
  extensions: []
208
207
  extra_rdoc_files: []
209
208
  files:
210
- - bin/handler-logstash.rb
211
- - lib/sensu-plugins-logstash.rb
209
+ - CHANGELOG.md
212
210
  - LICENSE
213
211
  - README.md
214
- - CHANGELOG.md
212
+ - bin/handler-logstash.rb
213
+ - lib/sensu-plugins-logstash.rb
214
+ - lib/sensu-plugins-logstash/version.rb
215
215
  homepage: https://github.com/sensu-plugins/sensu-plugins-logstash
216
216
  licenses:
217
217
  - MIT
218
- metadata: {}
219
- post_install_message:
218
+ metadata:
219
+ maintainer: "@mattyjones"
220
+ development_status: active
221
+ production_status: unstable - testing recommended
222
+ release_draft: 'false'
223
+ release_prerelease: 'false'
224
+ post_install_message: You can use the embedded Ruby by setting EMBEDDED_RUBY=true
225
+ in /etc/default/sensu
220
226
  rdoc_options: []
221
227
  require_paths:
222
228
  - lib
223
229
  required_ruby_version: !ruby/object:Gem::Requirement
224
230
  requirements:
225
- - - '>='
231
+ - - ">="
226
232
  - !ruby/object:Gem::Version
227
233
  version: 1.9.3
228
234
  required_rubygems_version: !ruby/object:Gem::Requirement
229
235
  requirements:
230
- - - '>'
236
+ - - ">="
231
237
  - !ruby/object:Gem::Version
232
- version: 1.3.1
238
+ version: '0'
233
239
  requirements: []
234
240
  rubyforge_project:
235
- rubygems_version: 2.0.14
241
+ rubygems_version: 2.4.6
236
242
  signing_key:
237
243
  specification_version: 4
238
- summary: Sensu Plugins for Logstash
244
+ summary: Sensu plugins for working with logstash
239
245
  test_files: []
metadata.gz.sig CHANGED
Binary file