sensu-plugins-strongswan 1.0.0 → 1.1.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 +5 -5
- data/CHANGELOG.md +15 -3
- data/README.md +1 -0
- data/bin/check-strongswan-connection.rb +49 -0
- data/lib/sensu-plugins-strongswan/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 711c5b636803ec54756604e3cd1b41134c8ec9ec65a9795e67d872aceedaf633
|
4
|
+
data.tar.gz: d2ad13c0ab097f364277edae55faebf40cb4b271abf64927e839281aa975100d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb6e96b31adf18a045f3358683e4a7e04e9fce77dd44f2ea97cd29b2de0e704990eaddc24181728bc90faeabd70d74f61bc39472fcc7400026350bfcd75a8541
|
7
|
+
data.tar.gz: 563064f24fd4da0bcab190a11b2f1057a0d01e2f3d26220e96e947e44d9b13a9656840537df7f60b7ad21ad892b6faf9682c6c93914fcf82e2b96d56ed6648fb
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,20 @@
|
|
1
|
-
#Change Log
|
1
|
+
# Change Log
|
2
2
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
3
3
|
|
4
|
-
This CHANGELOG follows the format listed
|
4
|
+
This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md)
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
|
+
|
8
|
+
## [1.1.0] - 2018-02-22
|
9
|
+
### Added
|
10
|
+
- check-strongswan-connection.rb: checks the health of a strongwan connection (@nishiki)
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
- update Changelog guidelines location (@majormoses)
|
14
|
+
|
15
|
+
### Fixed
|
16
|
+
- minor typos (@majormoses)
|
17
|
+
|
7
18
|
## [1.0.0] - 2017-07-09
|
8
19
|
### Added
|
9
20
|
- Ruby 2.3.0 & 2.4.1 testing (@Evesy)
|
@@ -25,6 +36,7 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
25
36
|
### Added
|
26
37
|
- add check-strongswan.rb and metrics-strongswan.rb plugins
|
27
38
|
|
28
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-strongswan/compare/1.
|
39
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-strongswan/compare/1.1.0...HEAD
|
40
|
+
[1.1.0]: https://github.com/sensu-plugins/sensu-plugins-strongswan/compare/1.0.0...1.1.0
|
29
41
|
[1.0.0]: https://github.com/sensu-plugins/sensu-plugins-strongswan/0.1.1...1.0.0
|
30
42
|
[0.1.1]: https://github.com/sensu-plugins/sensu-plugins-strongswan/compare/0.1.0...0.1.1
|
data/README.md
CHANGED
@@ -0,0 +1,49 @@
|
|
1
|
+
#! /usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# check-strongswan-connection.rb
|
4
|
+
#
|
5
|
+
# DESCRIPTION:
|
6
|
+
# This plugin checks the health of a Strongswan VPN connection
|
7
|
+
#
|
8
|
+
# OUTPUT:
|
9
|
+
# plain text
|
10
|
+
#
|
11
|
+
# PLATFORMS:
|
12
|
+
# Linux
|
13
|
+
#
|
14
|
+
# DEPENDENCIES:
|
15
|
+
# gem: sensu-plugin
|
16
|
+
#
|
17
|
+
# USAGE:
|
18
|
+
# check-strongswan-connectionion.rb -c CONNECTION_NAME
|
19
|
+
#
|
20
|
+
# NOTES:
|
21
|
+
# This plugin should be executed as root using sudo
|
22
|
+
#
|
23
|
+
# LICENSE:
|
24
|
+
# Copyright Adrien Waksberg <adrien.waksberg@doctolib.fr>
|
25
|
+
# Released under the same terms as Sensu (the MIT license); see LICENSE
|
26
|
+
# for details.
|
27
|
+
#
|
28
|
+
|
29
|
+
require 'sensu-plugin/check/cli'
|
30
|
+
|
31
|
+
# check strongswan connection status
|
32
|
+
class CheckStrongswanConnection < Sensu::Plugin::Check::CLI
|
33
|
+
option :connection,
|
34
|
+
description: 'Connection name to check',
|
35
|
+
short: '-c NAME',
|
36
|
+
long: '--connection NAME',
|
37
|
+
required: true
|
38
|
+
|
39
|
+
def run
|
40
|
+
output = `ipsec statusall #{config[:connection]}`
|
41
|
+
if output.include?('INSTALLED, TUNNEL,')
|
42
|
+
ok "the connection #{config[:connection]} is up"
|
43
|
+
elsif !output.include?(config[:connection])
|
44
|
+
warning "the connection #{config[:connection]} doesn't exist"
|
45
|
+
else
|
46
|
+
critical "the connection #{config[:connection]} is down"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-strongswan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.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:
|
11
|
+
date: 2018-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|
@@ -153,6 +153,7 @@ dependencies:
|
|
153
153
|
description: Sensu plugins for strongswan
|
154
154
|
email: "<sensu-users@googlegroups.com>"
|
155
155
|
executables:
|
156
|
+
- check-strongswan-connection.rb
|
156
157
|
- check-strongswan.rb
|
157
158
|
- metrics-strongswan.rb
|
158
159
|
extensions: []
|
@@ -161,6 +162,7 @@ files:
|
|
161
162
|
- CHANGELOG.md
|
162
163
|
- LICENSE
|
163
164
|
- README.md
|
165
|
+
- bin/check-strongswan-connection.rb
|
164
166
|
- bin/check-strongswan.rb
|
165
167
|
- bin/metrics-strongswan.rb
|
166
168
|
- lib/sensu-plugins-strongswan.rb
|
@@ -191,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
193
|
version: '0'
|
192
194
|
requirements: []
|
193
195
|
rubyforge_project:
|
194
|
-
rubygems_version: 2.
|
196
|
+
rubygems_version: 2.7.6
|
195
197
|
signing_key:
|
196
198
|
specification_version: 4
|
197
199
|
summary: Sensu plugins for strongswan
|