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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: dcedf8607fbba290f22e780873fa0524ce581264
4
- data.tar.gz: 7c1642dfc2887bec9f851a00a14be87f030ddf8a
2
+ SHA256:
3
+ metadata.gz: 3b5be61036fae51f4ec606df7c8396fd34103df2d17639b26f595ee0cffea692
4
+ data.tar.gz: d86c6b6e05e92a26f4b49580f6764275e042b64556b62571dc41f6aabb4ac694
5
5
  SHA512:
6
- metadata.gz: 4e227e924fbfe78d49d255e7b0b6c23fb0ab4db0c9e0a343d07e0e969955033b652fe60925ba15e453aeaa0e283302ea4c466f57e562f4f4ee1d02a7f3f3584f
7
- data.tar.gz: cbc3b1b0dc43eba5035885e845931da54f0d1a36976f8afdf6246f75d8976a1d3bd7a108f302c8606f1bd3ce815915782b7da4966d08498583d6716329afe304
6
+ metadata.gz: 570bd032e7930a82eb521ac3487d0e34fbca2ec4326e1df157756c14ee488c3b75a5955c3e58fb44786742be97d1c0782e76adcecf95844ee1b2bcdd5571a385
7
+ data.tar.gz: a470d545a496edacc4e1ce1f6fc0c1582883951acbbb3d7a8dfa2fd54040ff0db696d35848ac343ac18491ab70af9b81020409a043a3bd22f57925583a475a13
@@ -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.1...HEAD
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
@@ -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('.', '_')
@@ -1,8 +1,8 @@
1
1
  module SensuPluginsNetworkChecks
2
2
  module Version
3
3
  MAJOR = 2
4
- MINOR = 0
5
- PATCH = 1
4
+ MINOR = 1
5
+ PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
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.1
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-08-02 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: 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.4.5
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