sensu-plugins-network-checks 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +9 -3
- data/README.md +1 -1
- data/bin/check-ports.rb +13 -4
- data/lib/sensu-plugins-network-checks/version.rb +1 -1
- metadata +6 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 665a8903a3ed6672d21c0570796f8c7663d292a8
|
4
|
+
data.tar.gz: 5cdbdedacdb91911f625fb4043adce5566965ed9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2777eadcbfeaa769b56254865eae563a71182f7ae0f61e4b23b48509bf75007921b06d72986ea808ecb22c5e778c10bc14d8bea116a81a40269c86094a4a62ca
|
7
|
+
data.tar.gz: 7b9d2e6a5c9dd45f2b3eb4645d2e437a47196362d49ebead02211d48eda7a690ae74367065bb52b4ce93790367d8290306b43c190d12fadabef246244fa058d6
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -3,8 +3,15 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
3
3
|
|
4
4
|
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
|
5
5
|
|
6
|
-
##
|
7
|
-
|
6
|
+
## Unreleased
|
7
|
+
|
8
|
+
## [0.0.8] - 2015-11-12
|
9
|
+
### Added
|
10
|
+
- Support multiple port ranges for check-ports
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
- Updated net-ping gem to 1.7.8
|
14
|
+
- Updated whois gem to 3.6.2
|
8
15
|
|
9
16
|
## [0.0.7] - 2015-10-27
|
10
17
|
### Added
|
@@ -25,7 +32,6 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
25
32
|
### Changed
|
26
33
|
- general gem cleanup
|
27
34
|
|
28
|
-
|
29
35
|
## [0.0.4] - 2015-07-14
|
30
36
|
### Changed
|
31
37
|
- updated sensu-plugin gem to 1.2.0
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
[
|
2
|
+
[![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-network-checks.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-network-checks)
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/sensu-plugins-network-checks.svg)](http://badge.fury.io/rb/sensu-plugins-network-checks)
|
4
4
|
[![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-network-checks/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-network-checks)
|
5
5
|
[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-network-checks/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-network-checks)
|
data/bin/check-ports.rb
CHANGED
@@ -17,8 +17,8 @@
|
|
17
17
|
#
|
18
18
|
# USAGE:
|
19
19
|
#
|
20
|
-
#
|
21
|
-
# ./check-ports
|
20
|
+
# Ports are comma separated and support ranges
|
21
|
+
# ./check-ports.rb -H localhost -p 22,25,8100-8131,3030
|
22
22
|
#
|
23
23
|
# NOTES:
|
24
24
|
# By default, checks for openssh on localhost port 22
|
@@ -45,7 +45,7 @@ class CheckPort < Sensu::Plugin::Check::CLI
|
|
45
45
|
option :ports,
|
46
46
|
short: '-p PORTS',
|
47
47
|
long: '--ports PORTS',
|
48
|
-
description: 'Ports to check, comma separated (22,25,3030)',
|
48
|
+
description: 'Ports to check, comma separated (22,25,8100-8131,3030)',
|
49
49
|
default: '22'
|
50
50
|
|
51
51
|
option :timeout,
|
@@ -70,7 +70,16 @@ class CheckPort < Sensu::Plugin::Check::CLI
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def run
|
73
|
-
ports = config[:ports].split(',')
|
73
|
+
ports = config[:ports].split(',').flat_map do |port|
|
74
|
+
# Port range
|
75
|
+
if port =~ /^[0-9]+(-[0-9]+)$/
|
76
|
+
first_port, last_port = port.split('-')
|
77
|
+
(first_port.to_i..last_port.to_i).to_a
|
78
|
+
# Single port
|
79
|
+
else
|
80
|
+
port
|
81
|
+
end
|
82
|
+
end
|
74
83
|
okarray = []
|
75
84
|
ports.each do |port|
|
76
85
|
okarray << 'ok' if check_port port
|
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.
|
4
|
+
version: 0.0.8
|
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-
|
33
|
+
date: 2015-11-13 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: dnsbl-client
|
@@ -66,28 +66,28 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - '='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 1.7.
|
69
|
+
version: 1.7.8
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - '='
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: 1.7.
|
76
|
+
version: 1.7.8
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
78
|
name: whois
|
79
79
|
requirement: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - '='
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: 3.6.
|
83
|
+
version: 3.6.2
|
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.
|
90
|
+
version: 3.6.2
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: bundler
|
93
93
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
Binary file
|