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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 430387c41f029dd2327fd4ea1089d18d8083cfea
4
- data.tar.gz: 264be25e40eafe61fd08c71d2e0f7b1f8a965dd2
2
+ SHA256:
3
+ metadata.gz: 711c5b636803ec54756604e3cd1b41134c8ec9ec65a9795e67d872aceedaf633
4
+ data.tar.gz: d2ad13c0ab097f364277edae55faebf40cb4b271abf64927e839281aa975100d
5
5
  SHA512:
6
- metadata.gz: 7d6e79edac746abcc69a4a1547ed9a042163e8f9a0342fd4ab9ad484d2b872c6201dcf4e6efbc1c5ffb7b26548b9041eb8c546520f086c8e4b03333acb224963
7
- data.tar.gz: 5b220dc4de89a512075e910712746076071f2de1f8496f45ff6562871237a6d6dd5876b25e41ee8e45cf1664f7465dd5dabb0a2b9aea3f79a1b069c281bc57e2
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 at [Keep A Changelog](http://keepachangelog.com/)
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.0.0...HEAD
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
@@ -12,6 +12,7 @@
12
12
 
13
13
  * bin/check-strongswan.rb
14
14
  * bin/metrics-strongswan.rb
15
+ * bin/check-strongswan-connection.rb
15
16
 
16
17
  ## Usage
17
18
 
@@ -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
@@ -1,7 +1,7 @@
1
1
  module SensuPluginsStrongswan
2
2
  module Version
3
3
  MAJOR = 1
4
- MINOR = 0
4
+ MINOR = 1
5
5
  PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
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.0.0
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: 2017-07-10 00:00:00.000000000 Z
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.4.5
196
+ rubygems_version: 2.7.6
195
197
  signing_key:
196
198
  specification_version: 4
197
199
  summary: Sensu plugins for strongswan