sensu-plugins-snmp 1.1.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +22 -3
- data/bin/check-snmp-disk.rb +6 -0
- data/bin/check-snmp.rb +2 -1
- data/bin/metrics-snmp-bulk.rb +6 -0
- data/bin/metrics-snmp-if.rb +6 -1
- data/bin/metrics-snmp.rb +7 -2
- data/lib/sensu-plugins-snmp/version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 690ea8467b60b4fcc10d771da23db5bb9ae0688cab5bf226c806f2eab2f7cd9f
|
4
|
+
data.tar.gz: ba9524bba5ffa9cad29fb67dd1db5f114be7a5705db1f9fe63a5344e7e5df9b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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/
|
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
|
data/bin/check-snmp-disk.rb
CHANGED
@@ -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
data/bin/metrics-snmp-bulk.rb
CHANGED
@@ -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)
|
data/bin/metrics-snmp-if.rb
CHANGED
@@ -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
|
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:
|
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-
|
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.
|
218
|
+
rubygems_version: 2.7.1
|
219
219
|
signing_key:
|
220
220
|
specification_version: 4
|
221
221
|
summary: Sensu plugins for SNMP
|