sensu-plugins-snmp 2.0.0 → 2.1.0

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
  SHA256:
3
- metadata.gz: 690ea8467b60b4fcc10d771da23db5bb9ae0688cab5bf226c806f2eab2f7cd9f
4
- data.tar.gz: ba9524bba5ffa9cad29fb67dd1db5f114be7a5705db1f9fe63a5344e7e5df9b3
3
+ metadata.gz: f8ce8fe5fa3c177f034f7dbd7d1a559712ca7b3944763600978d055ec5bac398
4
+ data.tar.gz: 15dbda47ba10aadbe0dc719cfd68127d16eb5bad4b0d17d64cb930182733153c
5
5
  SHA512:
6
- metadata.gz: f0a4833383894a2b1e640a8ccc490b9fdc055738fc18a6193380b1ca670ff30cfca90845a6c5e502e0e008ff3d424a16623fdea1be3fb15d59f36faeed278cdd
7
- data.tar.gz: 02fd924cfdff21636dc79b8ad81a5938a34fd02c81888c02a16b01319c2cafa9bffa49790a362fe33312672f21c355cb1fd8e2df51e10477d3e9772522b1aec5
6
+ metadata.gz: 33e589a736c28423cc8ab83dd5027c85dcab51b69eaf0f21d19077ac5190a5152927dde44bd38f48deff98bbb38d1444609537960163798d2e797c4494c3a170
7
+ data.tar.gz: 5343e84097be502c70d718de07b74638862f8baf4d4b7d4cfb93e4e2b2a382b1c234553db4a7f6b3e57ffabf5ac6f1c38ed824a0a08625d35549655a513977d4
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [2.1.0] - 2018-06-25
10
+ ### Added
11
+ - metrics-snmp-if.rb: added `--timeout|-t` option which controls the request timeout (@rocdove)
12
+
9
13
  ## [2.0.0] - 2017-11-04
10
14
 
11
15
  ### Changed
@@ -70,7 +74,8 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
70
74
  ### Added
71
75
  - initial release
72
76
 
73
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-snmp/compare/2.0.0...HEAD
77
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-snmp/compare/2.1.0...HEAD
78
+ [2.1.0]: https://github.com/sensu-plugins/sensu-plugins-snmp/compare/2.0.0...2.1.0
74
79
  [2.0.0]: https://github.com/sensu-plugins/sensu-plugins-snmp/compare/1.1.0...2.0.0
75
80
  [1.1.0]: https://github.com/sensu-plugins/sensu-plugins-snmp/compare/1.0.0...1.1.0
76
81
  [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-snmp/compare/0.2.0...1.0.0
@@ -123,6 +123,12 @@ class SNMPIfStatsGraphite < Sensu::Plugin::Metric::CLI::Graphite
123
123
  default: false,
124
124
  description: 'Use low capacity counters'
125
125
 
126
+ option :timeout,
127
+ short: '-t TIMEOUT',
128
+ long: '--timeout TIMEOUT',
129
+ default: 5,
130
+ description: 'Request timeout'
131
+
126
132
  def run # rubocop:disable Metrics/AbcSize
127
133
  if_table_HC_columns = %w(
128
134
  ifHCInOctets ifHCOutOctets
@@ -143,7 +149,13 @@ class SNMPIfStatsGraphite < Sensu::Plugin::Metric::CLI::Graphite
143
149
  if_table_columns = if_table_common_columns +
144
150
  (config[:low_capacity] ? if_table_LC_columns : if_table_HC_columns)
145
151
 
146
- SNMP::Manager.open(host: config[:host].to_s, port: config[:port].to_i, community: config[:community].to_s, version: config[:version]) do |manager|
152
+ SNMP::Manager.open(
153
+ host: config[:host].to_s,
154
+ port: config[:port].to_i,
155
+ community: config[:community].to_s,
156
+ version: config[:version],
157
+ timeout: config[:timeout]
158
+ ) do |manager|
147
159
  manager.walk(if_table_columns) do |row_array|
148
160
  # turn row (an array) into a hash for eaiser access to the columns
149
161
  row = Hash[*if_table_columns.zip(row_array).flatten]
@@ -1,7 +1,7 @@
1
1
  module SensuPluginsSnmp
2
2
  module Version
3
3
  MAJOR = 2
4
- MINOR = 0
4
+ MINOR = 1
5
5
  PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-snmp
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-04 00:00:00.000000000 Z
11
+ date: 2018-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
@@ -215,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
215
  version: '0'
216
216
  requirements: []
217
217
  rubyforge_project:
218
- rubygems_version: 2.7.1
218
+ rubygems_version: 2.7.7
219
219
  signing_key:
220
220
  specification_version: 4
221
221
  summary: Sensu plugins for SNMP