sensu-plugins-snmptrap-extension 0.2.0 → 0.2.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: b9a0ba4669fb05ae1039fbf59f4bb0a282f593ab
4
- data.tar.gz: 36686e2a0d14e5e979a9896e6be199cf12ddd507
3
+ metadata.gz: 5a3e25eca55f15768fcbc23861eb307f77aacee1
4
+ data.tar.gz: e9d7c5c2123bf362fb7e22e701d4e0d8eefd6d67
5
5
  SHA512:
6
- metadata.gz: 9b73adb6c909802ba22b8371de7a5fa019d8073f709604881e2498a67c7a6ce97a6d5f7463e49380290de05fc99d69877732c3a1148588a23197baebca6079b8
7
- data.tar.gz: 0deabed059f0438d22a63f33207fb72f1c986273420755a93547f3388ba874fb56318c4f63842a3cf728932762a741d5a382b7481df4dd4592bbceb24f3ab3c5
6
+ metadata.gz: 5a7cdadb54c81de2ef0100cb8f81e992664017a360f0deb1213de96d49399b0cfffcc6a062c3bb384bd6704b97a6e51743207f6a75805d97a54fe6c1fc37eaad
7
+ data.tar.gz: 211cc884401929c20741f5985298007de7eb6097cc4c0d717b389ccf8f2678b1834ddd628aac265e0dc4d81303e8b898d29d17daa655bf7480ef3ebcbb830d22
data/CHANGELOG.md CHANGED
@@ -3,12 +3,16 @@ This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
4
  This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
5
5
 
6
-
7
6
  ## [Unreleased]
8
7
  ### Added
9
8
 
10
9
  ### Changed
11
10
 
11
+ ## [0.2.1] - 2016-06-04
12
+ ### Changed
13
+ - Fixing rubocop warnings
14
+ - Removed warning about SNMPv1 traps
15
+
12
16
  ## [0.2.0] - 2016-06-04
13
17
  ### Added
14
18
  - README: Instructions on installation
data/README.md CHANGED
@@ -36,7 +36,7 @@ and includes a traps configuration element that describes:
36
36
  * An array of traps that the extension will monitor for events (from any host) which includes
37
37
  * `trap_oid` - the identity of the trap
38
38
  * `trap` - A hash of key/value pairs that can be used as template values in the event
39
- * `event` - The template event to send to Sensu, including {template} variables for customisation based on the message
39
+ * `event` - The template event to send to Sensu, including `{template}` variables for customisation based on the message
40
40
 
41
41
 
42
42
  ### Trap Configuration
@@ -102,9 +102,8 @@ module Sensu
102
102
  end
103
103
 
104
104
  def validate
105
-
106
105
  if options[:client_socket_bind].nil?
107
- @logger.warn "couldnt find client socket binding - is it defined? https://sensuapp.org/docs/latest/reference/clients.html#socket-attributes"
106
+ @logger.warn 'couldnt find client socket binding - is it defined? https://sensuapp.org/docs/latest/reference/clients.html#socket-attributes'
108
107
  false
109
108
  end
110
109
  true
@@ -122,7 +121,7 @@ module Sensu
122
121
  @trapdefs.concat Array(::JSON.parse(File.read(file)))
123
122
  end
124
123
 
125
- @logger.debug "loaded trapdefs..."
124
+ @logger.debug 'loaded trapdefs...'
126
125
  @logger.debug @trapdefs.to_json
127
126
 
128
127
  @mibs = []
@@ -156,10 +155,6 @@ module Sensu
156
155
  # manager.load_modules(@mibs, DEFAULT_MIB_PATH)
157
156
  # @mib = manager.mib
158
157
 
159
- manager.on_trap_v1 do |trap|
160
- @logger.warn('SNMPTrap caught an snmp v1 trap which not currently handled')
161
- end
162
-
163
158
  manager.on_trap_v2c do |trap|
164
159
  @logger.debug('v2-Trap caught')
165
160
 
@@ -203,7 +198,7 @@ module Sensu
203
198
  @logger.debug "opening connection to #{host}:#{port}"
204
199
  t = TCPSocket.new host, port
205
200
  t.write(check.to_json + "\n")
206
- rescue Exception => e
201
+ rescue StandardError => e
207
202
  @logger.error(e)
208
203
  end
209
204
  end
@@ -2,7 +2,7 @@ module SensuPluginsSnmptrapExtension
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- PATCH = 0
5
+ PATCH = 1
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-snmptrap-extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Jackson
@@ -207,7 +207,7 @@ files:
207
207
  - LICENSE
208
208
  - README.md
209
209
  - CHANGELOG.md
210
- homepage: https://github.com/warmfusion/sensu-sensu-extension-snmptrap
210
+ homepage: https://github.com/warmfusion/sensu-extension-snmptrap
211
211
  licenses:
212
212
  - MIT
213
213
  metadata:
@@ -216,8 +216,8 @@ metadata:
216
216
  production_status: unstable - testing recommended
217
217
  release_draft: 'false'
218
218
  release_prerelease: 'false'
219
- post_install_message: You can use the embedded Ruby by setting EMBEDDED_RUBY=true
220
- in /etc/default/sensu
219
+ post_install_message: Ensure you symlink the bin/extension-snmptrap.rb to your sensu/extensions
220
+ directory
221
221
  rdoc_options: []
222
222
  require_paths:
223
223
  - lib