sensu-plugins-network-checks 0.0.8 → 0.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
2
  SHA1:
3
- metadata.gz: 665a8903a3ed6672d21c0570796f8c7663d292a8
4
- data.tar.gz: 5cdbdedacdb91911f625fb4043adce5566965ed9
3
+ metadata.gz: 66dd20964927c30f59619ad5761f68843ee37764
4
+ data.tar.gz: 8a9ef8e650b3097c7bdb51e2f3b8473a35e2c7ce
5
5
  SHA512:
6
- metadata.gz: 2777eadcbfeaa769b56254865eae563a71182f7ae0f61e4b23b48509bf75007921b06d72986ea808ecb22c5e778c10bc14d8bea116a81a40269c86094a4a62ca
7
- data.tar.gz: 7b9d2e6a5c9dd45f2b3eb4645d2e437a47196362d49ebead02211d48eda7a690ae74367065bb52b4ce93790367d8290306b43c190d12fadabef246244fa058d6
6
+ metadata.gz: f0975a6550663c34e8081c65dcdf5a8fecf035333ea0612dcc64994dba797f2761d052d5cd491628c677ff8d543d74b5e4aae315f04a2c08d50026e392ac4482
7
+ data.tar.gz: dd9900d4aac5f95589e02ae8ba55708c54c001b42dfc904bf5d44636c258208c06b922df5c12a620f0c921fa19704619d3269466e49594ed1dafe250ac3fa25e
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
5
5
 
6
6
  ## Unreleased
7
7
 
8
+ ## [0.1.0] - 2015-12-03
9
+ ### Added
10
+ - Added include and ignore options for devices at `metrics-net.rb`
11
+
12
+ ### Changed
13
+ - Updated whois gem to 3.6.3
14
+
8
15
  ## [0.0.8] - 2015-11-12
9
16
  ### Added
10
17
  - Support multiple port ranges for check-ports
@@ -27,7 +34,7 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
27
34
  ## [0.0.5] - 2015-08-05
28
35
  ### Added
29
36
  - Added new metrics-ping.rb plugin
30
- - Added check-whois-domain-expiration-multi.rb plugin to check multiple domains for expiratino using whois records
37
+ - Added check-whois-domain-expiration-multi.rb plugin to check multiple domains for expiration using whois records
31
38
 
32
39
  ### Changed
33
40
  - general gem cleanup
data/bin/metrics-net.rb CHANGED
@@ -36,7 +36,9 @@
36
36
  # servers.web01.eth1.rx_packets 563787422 1351112745
37
37
  #
38
38
  # NOTES:
39
- # Does it behave differently on specific platforms, specific use cases, etc
39
+ # Does it behave differently on specific platforms, specific use cases, etc.
40
+ # Devices can be specifically included or ignored using -i or -I options:
41
+ # e.g. metrics-net.rb -i veth,dummy
40
42
  #
41
43
  # LICENSE:
42
44
  # Copyright 2012 Joe Miller <https://github.com/joemiller>
@@ -57,6 +59,18 @@ class LinuxPacketMetrics < Sensu::Plugin::Metric::CLI::Graphite
57
59
  long: '--scheme SCHEME',
58
60
  default: "#{Socket.gethostname}.net"
59
61
 
62
+ option :ignore_device,
63
+ description: 'Ignore devices matching pattern(s)',
64
+ short: '-i DEV[,DEV]',
65
+ long: '--ignore-device',
66
+ proc: proc { |a| a.split(',') }
67
+
68
+ option :include_device,
69
+ description: 'Include only devices matching pattern(s)',
70
+ short: '-I DEV[,DEV]',
71
+ long: '--include-device',
72
+ proc: proc { |a| a.split(',') }
73
+
60
74
  def run
61
75
  timestamp = Time.now.to_i
62
76
 
@@ -65,6 +79,9 @@ class LinuxPacketMetrics < Sensu::Plugin::Metric::CLI::Graphite
65
79
  iface = File.basename(iface_path)
66
80
  next if iface == 'lo'
67
81
 
82
+ next if config[:ignore_device] && config[:ignore_device].find { |x| iface.match(x) }
83
+ next if config[:include_device] && !config[:include_device].find { |x| iface.match(x) }
84
+
68
85
  tx_pkts = File.open(iface_path + '/statistics/tx_packets').read.strip
69
86
  rx_pkts = File.open(iface_path + '/statistics/rx_packets').read.strip
70
87
  tx_bytes = File.open(iface_path + '/statistics/tx_bytes').read.strip
@@ -1,8 +1,8 @@
1
1
  module SensuPluginsNetworkChecks
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 0
5
- PATCH = 8
4
+ MINOR = 1
5
+ PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-network-checks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors
@@ -30,7 +30,7 @@ cert_chain:
30
30
  8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
31
31
  HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
32
32
  -----END CERTIFICATE-----
33
- date: 2015-11-13 00:00:00.000000000 Z
33
+ date: 2015-12-03 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: dnsbl-client
@@ -80,14 +80,14 @@ dependencies:
80
80
  requirements:
81
81
  - - '='
82
82
  - !ruby/object:Gem::Version
83
- version: 3.6.2
83
+ version: 3.6.3
84
84
  type: :runtime
85
85
  prerelease: false
86
86
  version_requirements: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - '='
89
89
  - !ruby/object:Gem::Version
90
- version: 3.6.2
90
+ version: 3.6.3
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: bundler
93
93
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
@@ -1 +1,3 @@
1
- tclL�t��%̦=̻؇��p�
1
+ ���?5���R��J"�eA���`��Ps6�\���A؁�d2��kEYbc��
2
+ �ɭFY<�y������<�/�٘N&~Γ?$��
3
+ � F�q���/40�0�*�EJZ4:]