sensu-plugins-network-checks 3.1.2 → 3.2.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 +4 -4
- data/CHANGELOG.md +6 -1
- data/bin/metrics-net.rb +6 -0
- data/lib/sensu-plugins-network-checks/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 75dc1fbc317bd118f4c23b73c9f205252f45d172596908b550370ecfa14ec8b2
|
|
4
|
+
data.tar.gz: e9b7b2a8bf61206636614c54e225f363ccf50df58d6060821ea5c8dd53daefbf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b5075fbdc1d8d2b318be88ea2a1b606fdb3b8d4be30e38a01fb08b78d250eb46b9dff104ec0b619c86a73491e60c2c253ea504db51f69a83d1fffc8ecb50546f
|
|
7
|
+
data.tar.gz: e1be3fb72df400fc60da02bc021b606a5af127b77c1162bd67c2e0710d22718e6bba0ec869d586dc67038f4056f5331b09010b6acb594644ba9f074b285ac09c
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugin
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [3.2.0] - 2018-08-06
|
|
9
|
+
### Added
|
|
10
|
+
- metrics-net.rb: allow including only interfaces whos status is `up` (@johannagnarsson)
|
|
11
|
+
|
|
8
12
|
## [3.1.2] - 2018-06-10
|
|
9
13
|
### Fixed
|
|
10
14
|
- metrics-netif.rb: allow you to actually pass in a value for `--average-key` (@scones)
|
|
@@ -224,7 +228,8 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugin
|
|
|
224
228
|
|
|
225
229
|
* initial release, same as community repo
|
|
226
230
|
|
|
227
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/3.
|
|
231
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/3.2.0...HEAD
|
|
232
|
+
[3.2.0]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/3.1.2...3.2.0
|
|
228
233
|
[3.1.2]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/3.1.1...3.1.2
|
|
229
234
|
[3.1.1]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/3.1.0...3.1.1
|
|
230
235
|
[3.1.0]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/3.0.0...3.1.0
|
data/bin/metrics-net.rb
CHANGED
|
@@ -73,6 +73,11 @@ class LinuxPacketMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
|
73
73
|
long: '--include-device',
|
|
74
74
|
proc: proc { |a| a.split(',') }
|
|
75
75
|
|
|
76
|
+
option :only_up,
|
|
77
|
+
description: 'Include only devices whose interface status is up',
|
|
78
|
+
short: '-u',
|
|
79
|
+
long: '--only-up'
|
|
80
|
+
|
|
76
81
|
def run
|
|
77
82
|
timestamp = Time.now.to_i
|
|
78
83
|
|
|
@@ -83,6 +88,7 @@ class LinuxPacketMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
|
83
88
|
|
|
84
89
|
next if config[:ignore_device] && config[:ignore_device].find { |x| iface.match(x) }
|
|
85
90
|
next if config[:include_device] && !config[:include_device].find { |x| iface.match(x) }
|
|
91
|
+
next if config[:only_up] && File.open(iface_path + '/operstate').read.strip != 'up'
|
|
86
92
|
|
|
87
93
|
tx_pkts = File.open(iface_path + '/statistics/tx_packets').read.strip
|
|
88
94
|
rx_pkts = File.open(iface_path + '/statistics/rx_packets').read.strip
|
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: 3.
|
|
4
|
+
version: 3.2.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: 2018-
|
|
11
|
+
date: 2018-08-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: sensu-plugin
|