sensu-plugins-snmptrap-extension 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/README.md +1 -1
- data/bin/extension-snmptrap.rb +3 -8
- data/lib/sensu-plugins-snmptrap-extension/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a3e25eca55f15768fcbc23861eb307f77aacee1
|
4
|
+
data.tar.gz: e9d7c5c2123bf362fb7e22e701d4e0d8eefd6d67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/bin/extension-snmptrap.rb
CHANGED
@@ -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
|
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
|
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
|
201
|
+
rescue StandardError => e
|
207
202
|
@logger.error(e)
|
208
203
|
end
|
209
204
|
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.
|
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-
|
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:
|
220
|
-
|
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
|