sensu-plugins-gluster 0.0.2 → 0.0.3
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +5 -1
- data/README.md +2 -1
- data/bin/check-gluster-georepl-status.rb +1 -1
- data/bin/check-gluster-status.rb +62 -0
- data/lib/sensu-plugins-gluster/version.rb +1 -1
- metadata +7 -5
- 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: e8e69aded6483a02537ab938d0452abdaad36913
|
4
|
+
data.tar.gz: 7b8a83b71242ad17c2f3e6f6d9ceff1b3efd6be8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efac37876afce1829efd4f31c577116316cae895ffa91e6b41ea4b3e5714b13fca4c965399339e231fcb63dae37ce0e22ff7332c9b0e76863b0c528125215be1
|
7
|
+
data.tar.gz: c360fc8ae99189cffab01974224aebebd5603d8853c1e8f731cfd1acb3fcc9fa7b74a1ab6df40c6b3abf7f2f40dbca376ac63c6cf03334f1eab2e3b922ef1f99
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,11 @@ 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
|
-
## Unreleased
|
6
|
+
## Unreleased
|
7
|
+
|
8
|
+
## [0.0.3] - 2015-10-15
|
9
|
+
### Changed
|
10
|
+
- Added check-gluster-status.rb
|
7
11
|
|
8
12
|
## [0.0.2] - 2015-07-14
|
9
13
|
### Changed
|
data/README.md
CHANGED
@@ -11,11 +11,12 @@
|
|
11
11
|
|
12
12
|
## Files
|
13
13
|
* bin/check-gluster-georepl-status.rb
|
14
|
+
* bin/check-gluster-status.rb
|
14
15
|
|
15
16
|
## Usage
|
16
17
|
|
17
18
|
## Installation
|
18
19
|
|
19
|
-
[Installation and Setup](
|
20
|
+
[Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
|
20
21
|
|
21
22
|
## Notes
|
@@ -39,7 +39,7 @@ class GlusterGeoReplStatus < Sensu::Plugin::Check::CLI
|
|
39
39
|
def run
|
40
40
|
errors = []
|
41
41
|
# #YELLOW
|
42
|
-
`sudo gluster volume geo-replication status`.each_line do |l|
|
42
|
+
`sudo gluster volume geo-replication status`.each_line do |l|
|
43
43
|
# Don't match those lines or conditions.
|
44
44
|
unless l =~ /(^geo-replication|^Another|^No active geo-replication sessions|^MASTER|^\s*$|^-)/
|
45
45
|
unless config[:states].include?(l.split[4])
|
@@ -0,0 +1,62 @@
|
|
1
|
+
#! /usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# check-guster-status
|
4
|
+
#
|
5
|
+
# DESCRIPTION:
|
6
|
+
# Verifies Gluster's volume replication status#
|
7
|
+
#
|
8
|
+
# OUTPUT:
|
9
|
+
# plain text
|
10
|
+
#
|
11
|
+
# PLATFORMS:
|
12
|
+
# Linux
|
13
|
+
#
|
14
|
+
# DEPENDENCIES:
|
15
|
+
# gem: sensu-plugin
|
16
|
+
#
|
17
|
+
# USAGE:
|
18
|
+
# #YELLOW
|
19
|
+
#
|
20
|
+
# NOTES:
|
21
|
+
#
|
22
|
+
# LICENSE:
|
23
|
+
# Samuel Terburg <samuel.terburg@panther-it.nl>
|
24
|
+
# Released under the same terms as Sensu (the MIT license); see LICENSE
|
25
|
+
# for details.
|
26
|
+
#
|
27
|
+
|
28
|
+
require 'rubygems' if RUBY_VERSION < '1.9.0'
|
29
|
+
require 'sensu-plugin/check/cli'
|
30
|
+
|
31
|
+
class GlusterReplStatus < Sensu::Plugin::Check::CLI
|
32
|
+
option :ignore_nfs,
|
33
|
+
short: '-n',
|
34
|
+
long: '--ignore-nfs',
|
35
|
+
description: 'Ignore builtin NFS server',
|
36
|
+
boolean: true,
|
37
|
+
default: false
|
38
|
+
|
39
|
+
option :ignore_selfheal,
|
40
|
+
short: '-s',
|
41
|
+
long: '--ignore-selfheal',
|
42
|
+
description: 'Ignore self-heal service',
|
43
|
+
boolean: true,
|
44
|
+
default: false
|
45
|
+
|
46
|
+
def run
|
47
|
+
errors = []
|
48
|
+
`sudo gluster volume status`.each_line do |l|
|
49
|
+
# Don't match those lines or conditions.
|
50
|
+
next unless l =~ / N /
|
51
|
+
unless (config[:ignore_nfs] && 'NFS'.include?(l.split[0])) || (config[:ignore_selfheal] && 'Self-heal'.include?(l.split[0]))
|
52
|
+
errors << "#{l.split[0]} #{l.split[1]} is DOWN"
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
if errors.empty?
|
57
|
+
ok
|
58
|
+
else
|
59
|
+
critical errors
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-gluster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
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-10-22 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: sensu-plugin
|
@@ -66,14 +66,14 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - '='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 0.32.1
|
70
70
|
type: :development
|
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:
|
76
|
+
version: 0.32.1
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
78
|
name: rspec
|
79
79
|
requirement: !ruby/object:Gem::Requirement
|
@@ -175,6 +175,7 @@ dependencies:
|
|
175
175
|
description: Sensu gluster plugins
|
176
176
|
email: "<sensu-users@googlegroups.com>"
|
177
177
|
executables:
|
178
|
+
- check-gluster-status.rb
|
178
179
|
- check-gluster-georepl-status.rb
|
179
180
|
extensions: []
|
180
181
|
extra_rdoc_files: []
|
@@ -183,6 +184,7 @@ files:
|
|
183
184
|
- LICENSE
|
184
185
|
- README.md
|
185
186
|
- bin/check-gluster-georepl-status.rb
|
187
|
+
- bin/check-gluster-status.rb
|
186
188
|
- lib/sensu-plugins-gluster.rb
|
187
189
|
- lib/sensu-plugins-gluster/version.rb
|
188
190
|
homepage: https://github.com/sensu-plugins/sensu-plugins-gluster
|
@@ -211,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
211
213
|
version: '0'
|
212
214
|
requirements: []
|
213
215
|
rubyforge_project:
|
214
|
-
rubygems_version: 2.4.
|
216
|
+
rubygems_version: 2.4.8
|
215
217
|
signing_key:
|
216
218
|
specification_version: 4
|
217
219
|
summary: Sensu plugins for gluster
|
metadata.gz.sig
CHANGED
Binary file
|