sensu-plugins-lvm 1.0.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -1
- data/README.md +1 -1
- data/bin/check-lv-usage.rb +6 -6
- data/bin/check-vg-usage.rb +5 -3
- data/bin/metrics-vg-usage.rb +4 -2
- data/lib/sensu-plugins-lvm.rb +2 -0
- data/lib/sensu-plugins-lvm/version.rb +4 -2
- metadata +20 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 191e3e6fcfe1e0e50f698578c31e75f6ada12962f8464f68bb110905498a1ba3
|
4
|
+
data.tar.gz: 61f96814b6aef1e93775956ada98e380816e9345fd5a9b9ef1bd6205619db33b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61e192e11e257274f4763668c47200f58b858211950329476b99567f1f5007389cdcc9e437d6e17da99e338058c8f147acdd35b2c2b9e12397392b45f8045def
|
7
|
+
data.tar.gz: 389db25b0b39f88c4c66d4af7542316d65e1984d692521f194dc1c8c6eb3b67fc256f6888269adf8063029cee7cada5b7e065016b509dba5d8b11a174d68df48
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,25 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
|
9
|
+
## [2.0.0] - 2018-07-18
|
10
|
+
### Breaking Changes
|
11
|
+
- removed ruby `< 2.3` support (@majormoses)
|
12
|
+
- bumped dependency of `sensu-plugin` to `~> 2.5` you can read about it [here](https://github.com/sensu-plugins/sensu-plugin/blob/master/CHANGELOG.md#v145---2017-03-07) (@majormoses)
|
13
|
+
|
14
|
+
### Security
|
15
|
+
- updated yard dependency to `~> 0.9.11` per: https://nvd.nist.gov/vuln/detail/CVE-2017-17042 (@majormoses)
|
16
|
+
- updated rubocop dependency to `~> 0.51.0` per: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8418. (@majormoses)
|
17
|
+
|
18
|
+
### Changed
|
19
|
+
- appeased the cops (@majormoses)
|
20
|
+
|
21
|
+
### Removed
|
22
|
+
- gemnasium badge (@majormoses)
|
23
|
+
|
24
|
+
### Added
|
25
|
+
- slack badge (@majormoses)
|
26
|
+
|
8
27
|
## [1.0.1] - 2018-07-06
|
9
28
|
### Fixed
|
10
29
|
- check-lv-usage.rb: emit an `unknown` with a useful message rather than a false `ok` when no volumes are found (@sys-ops)
|
@@ -36,7 +55,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
36
55
|
### Added
|
37
56
|
- Initial release
|
38
57
|
|
39
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-lvm/compare/
|
58
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-lvm/compare/2.0.0...HEAD
|
59
|
+
[2.0.0]: https://github.com/sensu-plugins/sensu-plugins-lvm/compare/1.0.1...2.0.0
|
40
60
|
[1.0.1]: https://github.com/sensu-plugins/sensu-plugins-lvm/compare/1.0.0...1.0.1
|
41
61
|
[1.0.0]: https://github.com/sensu-plugins/sensu-plugins-lvm/compare/0.0.4...1.0.0
|
42
62
|
[0.0.4]: https://github.com/sensu-plugins/sensu-plugins-lvm/compare/0.0.3...0.0.4
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/sensu-plugins-lvm.svg)](http://badge.fury.io/rb/sensu-plugins-lvm)
|
5
5
|
[![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-lvm/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-lvm)
|
6
6
|
[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-lvm/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-lvm)
|
7
|
-
[![
|
7
|
+
[![Community Slack](https://slack.sensu.io/badge.svg)](https://slack.sensu.io/badge)
|
8
8
|
|
9
9
|
## Functionality
|
10
10
|
|
data/bin/check-lv-usage.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
#! /usr/bin/env ruby
|
2
|
+
# frozen_string_literal: false
|
3
|
+
|
2
4
|
#
|
3
5
|
# check-lv-usage
|
4
6
|
#
|
@@ -83,13 +85,11 @@ class CheckLVUsage < Sensu::Plugin::Check::CLI
|
|
83
85
|
end
|
84
86
|
|
85
87
|
def empty_volumes_msg
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
On linux systems it will generally need to allow executing
|
88
|
+
<<~HEREDOC
|
89
|
+
An error occured getting the LVM info: got empty list of volumes.
|
90
|
+
Check to ensure sensu has been configured with appropriate permissions.
|
91
|
+
On linux systems it will generally need to allow executing `/sbin/lvm`
|
91
92
|
HEREDOC
|
92
|
-
string.squeeze(' ')
|
93
93
|
end
|
94
94
|
|
95
95
|
def filter_volumes(list)
|
data/bin/check-vg-usage.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
#! /usr/bin/env ruby
|
2
|
+
# frozen_string_literal: false
|
3
|
+
|
2
4
|
#
|
3
5
|
# check-vg-usage
|
4
6
|
#
|
@@ -72,8 +74,8 @@ class CheckVg < Sensu::Plugin::Check::CLI
|
|
72
74
|
def volume_groups
|
73
75
|
LVM::LVM.new.volume_groups.each do |line|
|
74
76
|
begin
|
75
|
-
next if config[:ignorevg]
|
76
|
-
next if config[:ignorevgre]
|
77
|
+
next if config[:ignorevg]&.include?(line.name)
|
78
|
+
next if config[:ignorevgre]&.match(line.name)
|
77
79
|
next if config[:includevg] && !config[:includevg].include?(line.name)
|
78
80
|
rescue StandardError
|
79
81
|
unknown 'An error occured getting the LVM info'
|
@@ -107,7 +109,7 @@ class CheckVg < Sensu::Plugin::Check::CLI
|
|
107
109
|
[1024, 'KiB'],
|
108
110
|
[0, 'B']
|
109
111
|
].detect { |unit| bytes >= unit[0] }
|
110
|
-
if bytes
|
112
|
+
if bytes.positive?
|
111
113
|
bytes / units[0]
|
112
114
|
else
|
113
115
|
units[1]
|
data/bin/metrics-vg-usage.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
#! /usr/bin/env ruby
|
2
|
+
# frozen_string_literal: false
|
3
|
+
|
2
4
|
#
|
3
5
|
# metrics-vg-usage
|
4
6
|
#
|
@@ -59,8 +61,8 @@ class VgUsageMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
59
61
|
def volume_groups
|
60
62
|
LVM::LVM.new.volume_groups.each do |line|
|
61
63
|
begin
|
62
|
-
next if config[:ignorevg]
|
63
|
-
next if config[:ignorevgre]
|
64
|
+
next if config[:ignorevg]&.include?(line.name)
|
65
|
+
next if config[:ignorevgre]&.match(line.name)
|
64
66
|
next if config[:includevg] && !config[:includevg].include?(line.name)
|
65
67
|
rescue StandardError
|
66
68
|
unknown 'An error occured getting the LVM info'
|
data/lib/sensu-plugins-lvm.rb
CHANGED
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-lvm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.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-07-
|
11
|
+
date: 2018-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: chef-ruby-lvm
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.3.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.3.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: chef-ruby-lvm
|
28
|
+
name: chef-ruby-lvm-attrib
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.2.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.2.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: sensu-plugin
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '2.5'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '2.5'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,47 +137,47 @@ dependencies:
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '3.2'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: rspec
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
145
|
+
version: '3.4'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
152
|
+
version: '3.4'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
154
|
+
name: rubocop
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
159
|
+
version: 0.51.0
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
166
|
+
version: 0.51.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: yard
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
173
|
+
version: 0.9.11
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
180
|
+
version: 0.9.11
|
181
181
|
description: Sensu plugins for LVM
|
182
182
|
email: "<sensu-users@googlegroups.com>"
|
183
183
|
executables:
|
@@ -213,7 +213,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
213
213
|
requirements:
|
214
214
|
- - ">="
|
215
215
|
- !ruby/object:Gem::Version
|
216
|
-
version: 2.
|
216
|
+
version: 2.3.0
|
217
217
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
218
218
|
requirements:
|
219
219
|
- - ">="
|