sensu-plugins-snmp 1.1.0 → 2.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 584d6af8dd475684a3a2a3c249267fe64c8e09c5
4
- data.tar.gz: 94cfedd800cafdcc15781a9b72482388adfcbc83
2
+ SHA256:
3
+ metadata.gz: 690ea8467b60b4fcc10d771da23db5bb9ae0688cab5bf226c806f2eab2f7cd9f
4
+ data.tar.gz: ba9524bba5ffa9cad29fb67dd1db5f114be7a5705db1f9fe63a5344e7e5df9b3
5
5
  SHA512:
6
- metadata.gz: eeb5a058ec7e1e5f5b40f922d47e7915fac1149034bc8276b57fb173968df5eb1190a969f091440027e38baf1bf052cc314d8c4f782f64504069cdf2e057ef45
7
- data.tar.gz: 88cea9083734a03bda1b414fa8d440dbc65ff8172416d5d8ec899eb18954d2c1ce7520b695bd4398ce19f6fb49601cdc2371f96b4e8037e9d0d7f31d7a735aa9
6
+ metadata.gz: f0a4833383894a2b1e640a8ccc490b9fdc055738fc18a6193380b1ca670ff30cfca90845a6c5e502e0e008ff3d424a16623fdea1be3fb15d59f36faeed278cdd
7
+ data.tar.gz: 02fd924cfdff21636dc79b8ad81a5938a34fd02c81888c02a16b01319c2cafa9bffa49790a362fe33312672f21c355cb1fd8e2df51e10477d3e9772522b1aec5
data/CHANGELOG.md CHANGED
@@ -1,10 +1,28 @@
1
- #Change Log
1
+ # Change Log
2
2
  This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
- This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
4
+ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md).
5
+ Which is based on [Keep A Changelog](http://keepachangelog.com/)
5
6
 
6
7
  ## [Unreleased]
7
8
 
9
+ ## [2.0.0] - 2017-11-04
10
+
11
+ ### Changed
12
+ - updated changelog guideline location (@majormoses)
13
+
14
+ ### Fixed
15
+ - typos in changelog and pr template (@majormoses)
16
+
17
+ ### Added
18
+ - check-snmp-disk.rb: added `--port|-P` option (@freepenguins)
19
+ - metrics-snmp.rb: added `--port|-P` option (@freepenguins)
20
+ - metrics-snmp-bulk.rb: added `--port|-P` option (@freepenguins)
21
+ - metrics-snmp-if.rb: added `--port|-P` option (@freepenguins)
22
+
23
+ ### Breaking Change
24
+ - check-snmp.rb: changed port option from `-p` to `-P` to avoid confusion with prefix (@freepenguins)
25
+
8
26
  ## [1.1.0] - 2017-10-04
9
27
  ### Added
10
28
  - check-snmp.rb: added `--port` option (@freepenguins)
@@ -52,7 +70,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
52
70
  ### Added
53
71
  - initial release
54
72
 
55
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-snmp/compare/1.1.0...HEAD
73
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-snmp/compare/2.0.0...HEAD
74
+ [2.0.0]: https://github.com/sensu-plugins/sensu-plugins-snmp/compare/1.1.0...2.0.0
56
75
  [1.1.0]: https://github.com/sensu-plugins/sensu-plugins-snmp/compare/1.0.0...1.1.0
57
76
  [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-snmp/compare/0.2.0...1.0.0
58
77
  [0.2.0]: https://github.com/sensu-plugins/sensu-plugins-snmp/compare/0.1.0...0.2.0
@@ -42,6 +42,11 @@ class CheckSNMP < Sensu::Plugin::Check::CLI
42
42
  default: '127.0.0.1',
43
43
  description: 'SNMP hostname'
44
44
 
45
+ option :port,
46
+ short: '-P port',
47
+ long: '--port PORT',
48
+ default: '161'
49
+
45
50
  option :community,
46
51
  short: '-C snmp community',
47
52
  default: 'public',
@@ -96,6 +101,7 @@ class CheckSNMP < Sensu::Plugin::Check::CLI
96
101
  dev_used_oid = base_oid + '.6'
97
102
  begin
98
103
  manager = SNMP::Manager.new(host: config[:host].to_s,
104
+ port: config[:port].to_i,
99
105
  community: config[:community].to_s,
100
106
  version: config[:snmp_version].to_sym,
101
107
  timeout: config[:timeout].to_i)
data/bin/check-snmp.rb CHANGED
@@ -31,7 +31,8 @@ class CheckSNMP < Sensu::Plugin::Check::CLI
31
31
  default: '127.0.0.1'
32
32
 
33
33
  option :port,
34
- short: '-p port',
34
+ short: '-P port',
35
+ long: '--port PORT',
35
36
  default: '161'
36
37
 
37
38
  option :community,
@@ -30,6 +30,11 @@ class SNMPGraphite < Sensu::Plugin::Metric::CLI::Graphite
30
30
  default: '127.0.0.1',
31
31
  required: true
32
32
 
33
+ option :port,
34
+ short: '-P port',
35
+ long: '--port PORT',
36
+ default: '161'
37
+
33
38
  option :community,
34
39
  short: '-C snmp community',
35
40
  boolean: true,
@@ -86,6 +91,7 @@ class SNMPGraphite < Sensu::Plugin::Metric::CLI::Graphite
86
91
  mibs = config[:mibs].split(',')
87
92
  begin
88
93
  manager = SNMP::Manager.new(host: config[:host].to_s,
94
+ port: config[:port].to_i,
89
95
  community: config[:community].to_s,
90
96
  version: config[:snmp_version].to_sym,
91
97
  timeout: config[:timeout].to_i)
@@ -52,6 +52,11 @@ class SNMPIfStatsGraphite < Sensu::Plugin::Metric::CLI::Graphite
52
52
  default: '127.0.0.1',
53
53
  required: true
54
54
 
55
+ option :port,
56
+ short: '-P port',
57
+ long: '--port PORT',
58
+ default: '161'
59
+
55
60
  option :community,
56
61
  short: '-C snmp community',
57
62
  boolean: true,
@@ -138,7 +143,7 @@ class SNMPIfStatsGraphite < Sensu::Plugin::Metric::CLI::Graphite
138
143
  if_table_columns = if_table_common_columns +
139
144
  (config[:low_capacity] ? if_table_LC_columns : if_table_HC_columns)
140
145
 
141
- SNMP::Manager.open(host: config[:host].to_s, community: config[:community].to_s, version: config[:version]) do |manager|
146
+ SNMP::Manager.open(host: config[:host].to_s, port: config[:port].to_i, community: config[:community].to_s, version: config[:version]) do |manager|
142
147
  manager.walk(if_table_columns) do |row_array|
143
148
  # turn row (an array) into a hash for eaiser access to the columns
144
149
  row = Hash[*if_table_columns.zip(row_array).flatten]
data/bin/metrics-snmp.rb CHANGED
@@ -10,7 +10,7 @@
10
10
  #
11
11
  # USAGE:
12
12
  #
13
- # check-snmp -h host -C community -O oid -p prefix -s suffix
13
+ # check-snmp -h host -P port -C community -O oid -p prefix -s suffix
14
14
  #
15
15
  # LICENSE:
16
16
  # Copyright (c) 2013 Double Negative Limited
@@ -30,6 +30,11 @@ class SNMPGraphite < Sensu::Plugin::Metric::CLI::Graphite
30
30
  default: '127.0.0.1',
31
31
  required: true
32
32
 
33
+ option :port,
34
+ short: '-P port',
35
+ long: '--port PORT',
36
+ default: '161'
37
+
33
38
  option :community,
34
39
  short: '-C snmp community',
35
40
  boolean: true,
@@ -71,7 +76,7 @@ class SNMPGraphite < Sensu::Plugin::Metric::CLI::Graphite
71
76
  def run
72
77
  mibs = config[:mibs].split(',')
73
78
  begin
74
- manager = SNMP::Manager.new(host: config[:host].to_s, community: config[:community].to_s, version: config[:snmp_version].to_sym)
79
+ manager = SNMP::Manager.new(host: config[:host].to_s, port: config[:port].to_i, community: config[:community].to_s, version: config[:snmp_version].to_sym)
75
80
  if config[:mibdir] && !mibs.empty?
76
81
  manager.load_modules(mibs, config[:mibdir])
77
82
  end
@@ -1,7 +1,7 @@
1
1
  module SensuPluginsSnmp
2
2
  module Version
3
- MAJOR = 1
4
- MINOR = 1
3
+ MAJOR = 2
4
+ MINOR = 0
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: 1.1.0
4
+ version: 2.0.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-10-05 00:00:00.000000000 Z
11
+ date: 2017-11-04 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.6.13
218
+ rubygems_version: 2.7.1
219
219
  signing_key:
220
220
  specification_version: 4
221
221
  summary: Sensu plugins for SNMP