sensu-plugins-snmp 2.0.0 → 2.1.0
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 +6 -1
- data/bin/metrics-snmp-if.rb +13 -1
- data/lib/sensu-plugins-snmp/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8ce8fe5fa3c177f034f7dbd7d1a559712ca7b3944763600978d055ec5bac398
|
4
|
+
data.tar.gz: 15dbda47ba10aadbe0dc719cfd68127d16eb5bad4b0d17d64cb930182733153c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
data/bin/metrics-snmp-if.rb
CHANGED
@@ -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(
|
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]
|
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.
|
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:
|
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.
|
218
|
+
rubygems_version: 2.7.7
|
219
219
|
signing_key:
|
220
220
|
specification_version: 4
|
221
221
|
summary: Sensu plugins for SNMP
|