sensu-plugins-network-checks 2.0.1 → 2.1.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 +7 -1
- data/bin/metrics-interface.rb +7 -0
- data/lib/sensu-plugins-network-checks/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: 3b5be61036fae51f4ec606df7c8396fd34103df2d17639b26f595ee0cffea692
|
4
|
+
data.tar.gz: d86c6b6e05e92a26f4b49580f6764275e042b64556b62571dc41f6aabb4ac694
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 570bd032e7930a82eb521ac3487d0e34fbca2ec4326e1df157756c14ee488c3b75a5955c3e58fb44786742be97d1c0782e76adcecf95844ee1b2bcdd5571a385
|
7
|
+
data.tar.gz: a470d545a496edacc4e1ce1f6fc0c1582883951acbbb3d7a8dfa2fd54040ff0db696d35848ac343ac18491ab70af9b81020409a043a3bd22f57925583a475a13
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,11 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
|
9
|
+
## [2.1.0] - 2017-11-03
|
10
|
+
### Added
|
11
|
+
- metrics-interface.rb: Option to listen to specfic interface. (@parin921996)
|
12
|
+
|
8
13
|
## [2.0.1] - 2017-08-01
|
9
14
|
### Added
|
10
15
|
- ruby 2.4 testing to travis (@majormoses)
|
@@ -179,7 +184,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
179
184
|
|
180
185
|
* initial release, same as community repo
|
181
186
|
|
182
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/2.0
|
187
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/2.1.0...HEAD
|
188
|
+
[2.1.0]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/2.0.1...2.1.0
|
183
189
|
[2.0.1]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/2.0.0...2.0.1
|
184
190
|
[2.0.0]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/1.2.0...2.0.0
|
185
191
|
[1.2.0]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/1.1.0...1.2.0
|
data/bin/metrics-interface.rb
CHANGED
@@ -43,6 +43,12 @@ class InterfaceGraphite < Sensu::Plugin::Metric::CLI::Graphite
|
|
43
43
|
long: '--exclude-interface',
|
44
44
|
proc: proc { |a| a.split(',') }
|
45
45
|
|
46
|
+
option :includeinterface,
|
47
|
+
description: 'List of interfaces to include',
|
48
|
+
short: '-i INTERFACE[,INTERFACE]',
|
49
|
+
long: '--include-interface',
|
50
|
+
proc: proc { |a| a.split(',') }
|
51
|
+
|
46
52
|
def run
|
47
53
|
# Metrics borrowed from hoardd: https://github.com/coredump/hoardd
|
48
54
|
|
@@ -66,6 +72,7 @@ class InterfaceGraphite < Sensu::Plugin::Metric::CLI::Graphite
|
|
66
72
|
File.open('/proc/net/dev', 'r').each_line do |line|
|
67
73
|
interface, stats_string = line.scan(/^\s*([^:]+):\s*(.*)$/).first
|
68
74
|
next if config[:excludeinterface] && config[:excludeinterface].find { |x| line.match(x) }
|
75
|
+
next if config[:includeinterface] && !(config[:includeinterface].find { |x| line.match(x) })
|
69
76
|
next unless interface
|
70
77
|
if interface.is_a?(String)
|
71
78
|
interface = interface.tr('.', '_')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-network-checks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.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
|
+
date: 2017-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dnsbl-client
|
@@ -315,7 +315,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
315
315
|
version: '0'
|
316
316
|
requirements: []
|
317
317
|
rubyforge_project:
|
318
|
-
rubygems_version: 2.
|
318
|
+
rubygems_version: 2.7.1
|
319
319
|
signing_key:
|
320
320
|
specification_version: 4
|
321
321
|
summary: Sensu plugins for checking network hardware, connections, and data
|