sensu-plugins-lxc 0.0.3 → 1.0.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 +13 -5
- data/CHANGELOG.md +25 -9
- data/README.md +2 -3
- data/bin/check-lxc-memstat.rb +4 -3
- data/bin/check-lxc-status.rb +2 -1
- data/lib/sensu-plugins-lxc/version.rb +2 -2
- metadata +57 -79
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
|
|
2
|
+
!binary "U0hBMQ==":
|
|
3
|
+
metadata.gz: !binary |-
|
|
4
|
+
Y2IyZWQ5ZmNiZjQzNDA2N2M1MjczYzlhODM1YmZkZWIzMjgxNjg3Ng==
|
|
5
|
+
data.tar.gz: !binary |-
|
|
6
|
+
ZmY1Mjg2Y2QwODljNjllMzU1OWEyYmJjMjQwMWRmYzUwNjY2NTYyNg==
|
|
5
7
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
|
|
8
|
+
metadata.gz: !binary |-
|
|
9
|
+
YmVjOGVkMWIzNTM3ZTdlODk3NWFjNDRmZTcyMGFhMzM1NDI4OThlYTE5N2U1
|
|
10
|
+
NTdiZWFjNGU0ZWNkNWYxNzgwM2Y2YWM3Nzg0YTk4ZGI3NWRjMzY1ZjRlYzU1
|
|
11
|
+
ZTQxNjY3MjE2NTFkZjM1OWRjYWM5OGJiYTA2ZjQyY2RmMDJlYTc=
|
|
12
|
+
data.tar.gz: !binary |-
|
|
13
|
+
YzUwNTkyYTk3MzQ3NzU1MmU0N2UzMDk1ZDlkMzYxZmQzODhkZjRlMWNlZTA3
|
|
14
|
+
MjRmYjM5MTE1MzQ4ZGVhMWY5YzUwNWFjZDg5ZWZmMzhjYzg3Y2FiMzRjNThj
|
|
15
|
+
ZDJmNTU3MzY2MDk2ZDY1YjBmZjI2MGU0YWU1Y2RmMmZmMzY1ZGE=
|
data/CHANGELOG.md
CHANGED
|
@@ -3,21 +3,37 @@ 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
7
|
|
|
8
|
-
## [0.0
|
|
9
|
-
###
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
## 0.0.1 - 2015-05-29
|
|
8
|
+
## [1.0.0] - 2016-05-23
|
|
9
|
+
### Removed
|
|
10
|
+
- Ruby 1.9.3 support
|
|
13
11
|
|
|
14
12
|
### Added
|
|
15
|
-
-
|
|
13
|
+
- Ruby 2.3 support
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
### Fixed
|
|
16
|
+
- Fix method missing error on Ruby 2
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- Update to rubocop 0.40 and cleanup
|
|
18
20
|
|
|
21
|
+
## [0.0.3] - 2015-07-14
|
|
22
|
+
### Changed
|
|
23
|
+
- updated sensu-plugin gem to 1.2.0
|
|
24
|
+
|
|
25
|
+
## [0.0.2] - 2015-06-03
|
|
19
26
|
### Fixed
|
|
20
27
|
- added binstubs
|
|
21
28
|
|
|
22
29
|
### Changed
|
|
23
|
-
- removed cruft from /lib
|
|
30
|
+
- removed cruft from /lib
|
|
31
|
+
|
|
32
|
+
## 0.0.1 - 2015-05-29
|
|
33
|
+
### Added
|
|
34
|
+
- initial release
|
|
35
|
+
|
|
36
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-lxc/compare/1.0.0...HEAD
|
|
37
|
+
[1.0.0]: https://github.com/sensu-plugins/sensu-plugins-lxc/compare/0.0.3...1.0.0
|
|
38
|
+
[0.0.3]: https://github.com/sensu-plugins/sensu-plugins-lxc/compare/0.0.2...0.0.3
|
|
39
|
+
[0.0.2]: https://github.com/sensu-plugins/sensu-plugins-lxc/compare/0.0.1...0.0.2
|
data/README.md
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
## Sensu-Plugins-lxc
|
|
2
2
|
|
|
3
|
-
[
|
|
3
|
+
[](https://travis-ci.org/sensu-plugins/sensu-plugins-lxc)
|
|
4
4
|
[](http://badge.fury.io/rb/sensu-plugins-lxc)
|
|
5
5
|
[](https://codeclimate.com/github/sensu-plugins/sensu-plugins-lxc)
|
|
6
6
|
[](https://codeclimate.com/github/sensu-plugins/sensu-plugins-lxc)
|
|
7
7
|
[](https://gemnasium.com/sensu-plugins/sensu-plugins-lxc)
|
|
8
|
-
[](https://codeship.com/projects/82834)
|
|
9
8
|
|
|
10
9
|
## Functionality
|
|
11
10
|
|
|
@@ -17,6 +16,6 @@
|
|
|
17
16
|
|
|
18
17
|
## Installation
|
|
19
18
|
|
|
20
|
-
[Installation and Setup](
|
|
19
|
+
[Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
|
|
21
20
|
|
|
22
21
|
## Notes
|
data/bin/check-lxc-memstat.rb
CHANGED
|
@@ -48,14 +48,15 @@ class CheckLXCMemstat < Sensu::Plugin::Check::CLI
|
|
|
48
48
|
default: '90'
|
|
49
49
|
|
|
50
50
|
def run
|
|
51
|
-
|
|
51
|
+
lxc = LXC.new
|
|
52
|
+
conn = LXC.container.new(lxc: lxc, name: config[:name].to_s)
|
|
52
53
|
if conn.exists?
|
|
53
54
|
if conn.running?
|
|
54
55
|
used = conn.memory_usage
|
|
55
56
|
max = conn.memory_limit
|
|
56
|
-
if used > (max * (
|
|
57
|
+
if used > (max * (config[:critical].to_s.to_f / 100))
|
|
57
58
|
critical "container #{config[:name]} memory usage crossed the critical limit"
|
|
58
|
-
elsif used > (max * (
|
|
59
|
+
elsif used > (max * (config[:warning].to_s.to_f / 100))
|
|
59
60
|
warning "container #{config[:name]} memory usage crossed the warning limit"
|
|
60
61
|
else
|
|
61
62
|
ok "container #{config[:name]} memory usage is normal"
|
data/bin/check-lxc-status.rb
CHANGED
|
@@ -38,7 +38,8 @@ class CheckLXCSTATUS < Sensu::Plugin::Check::CLI
|
|
|
38
38
|
default: 'testdebian'
|
|
39
39
|
|
|
40
40
|
def run
|
|
41
|
-
|
|
41
|
+
lxc = LXC.new
|
|
42
|
+
conn = LXC.container.new(lxc: lxc, name: config[:name].to_s)
|
|
42
43
|
if conn.exists?
|
|
43
44
|
if conn.stopped?
|
|
44
45
|
critical "container #{config[:name]} is Stopped"
|
metadata
CHANGED
|
@@ -1,51 +1,29 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sensu-plugins-lxc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sensu Plugins and contributors
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
|
-
cert_chain:
|
|
11
|
-
-
|
|
12
|
-
-----BEGIN CERTIFICATE-----
|
|
13
|
-
MIIDgDCCAmigAwIBAgIBATANBgkqhkiG9w0BAQUFADBDMRIwEAYDVQQDDAltYXR0
|
|
14
|
-
am9uZXMxGDAWBgoJkiaJk/IsZAEZFgh5aWVsZGJvdDETMBEGCgmSJomT8ixkARkW
|
|
15
|
-
A2NvbTAeFw0xNTAxMjgyMTAyNTFaFw0xNjAxMjgyMTAyNTFaMEMxEjAQBgNVBAMM
|
|
16
|
-
CW1hdHRqb25lczEYMBYGCgmSJomT8ixkARkWCHlpZWxkYm90MRMwEQYKCZImiZPy
|
|
17
|
-
LGQBGRYDY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyTSzVYnO
|
|
18
|
-
CLgyrIyT1mBQakArQyW8xhi6MlDqyzXHJGeERT790U6EgoBVeS4XoK0ptFZNR8Tf
|
|
19
|
-
zko0w+Nv47TarSCgkPOaxY+mxWnAVR10dOmfeLr7huiMyps+YD56/EF2FqQ3jf/+
|
|
20
|
-
qohENfKD91qy1ieEy+Fn7Pf74ltbNKUdkb9a9eFXQ0DQ4ip5vik7DzjQkUTj4lca
|
|
21
|
-
k6ArwnmHX4YDhZoYtrQJ8jVktN0/+NtA40M5qkCYHNe5tUW25b/tKVYuioxG6b2Z
|
|
22
|
-
oIzaZxRLxf6HVAWpCVRT/F5+/yjigkX4u++eYacfLGleXQzoK7BL65vHGMJygWEE
|
|
23
|
-
0TKGqFOrl/L0AQIDAQABo38wfTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNV
|
|
24
|
-
HQ4EFgQUEf6a8Td7MrSZc8ImbLFZAENPbz0wIQYDVR0RBBowGIEWbWF0dGpvbmVz
|
|
25
|
-
QHlpZWxkYm90LmNvbTAhBgNVHRIEGjAYgRZtYXR0am9uZXNAeWllbGRib3QuY29t
|
|
26
|
-
MA0GCSqGSIb3DQEBBQUAA4IBAQBbzXAYA3BVGw8DZ0YYoY1VHPNEcH5qPIApmHO8
|
|
27
|
-
rvSmuUT0yMEi7u00H/5uHRFf4LleGT/+sTdyXKsNPGT9kdRuQEgwi+vf7Zfvd8aX
|
|
28
|
-
UF/+4VkEYf/8rV8Ere6u2QaWPgApdMV6JjKr1fAwCTd8AuGXNaWItiPPMseSQzLJ
|
|
29
|
-
JKP4hVvbc1d+oS925B1lcBiqn2aYvElbyNAVmQPywNNqkWmvtlqj9ZVJfV5HQLdu
|
|
30
|
-
8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
|
|
31
|
-
HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
|
|
32
|
-
-----END CERTIFICATE-----
|
|
33
|
-
date: 2015-07-14 00:00:00.000000000 Z
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2016-05-24 00:00:00.000000000 Z
|
|
34
12
|
dependencies:
|
|
35
13
|
- !ruby/object:Gem::Dependency
|
|
36
14
|
name: sensu-plugin
|
|
37
15
|
requirement: !ruby/object:Gem::Requirement
|
|
38
16
|
requirements:
|
|
39
|
-
- -
|
|
17
|
+
- - ~>
|
|
40
18
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: 1.2
|
|
19
|
+
version: '1.2'
|
|
42
20
|
type: :runtime
|
|
43
21
|
prerelease: false
|
|
44
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
45
23
|
requirements:
|
|
46
|
-
- -
|
|
24
|
+
- - ~>
|
|
47
25
|
- !ruby/object:Gem::Version
|
|
48
|
-
version: 1.2
|
|
26
|
+
version: '1.2'
|
|
49
27
|
- !ruby/object:Gem::Dependency
|
|
50
28
|
name: lxc
|
|
51
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -61,136 +39,136 @@ dependencies:
|
|
|
61
39
|
- !ruby/object:Gem::Version
|
|
62
40
|
version: 0.6.0
|
|
63
41
|
- !ruby/object:Gem::Dependency
|
|
64
|
-
name:
|
|
42
|
+
name: bundler
|
|
65
43
|
requirement: !ruby/object:Gem::Requirement
|
|
66
44
|
requirements:
|
|
67
|
-
- -
|
|
45
|
+
- - ~>
|
|
68
46
|
- !ruby/object:Gem::Version
|
|
69
|
-
version: '
|
|
47
|
+
version: '1.7'
|
|
70
48
|
type: :development
|
|
71
49
|
prerelease: false
|
|
72
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
73
51
|
requirements:
|
|
74
|
-
- -
|
|
52
|
+
- - ~>
|
|
75
53
|
- !ruby/object:Gem::Version
|
|
76
|
-
version: '
|
|
54
|
+
version: '1.7'
|
|
77
55
|
- !ruby/object:Gem::Dependency
|
|
78
|
-
name:
|
|
56
|
+
name: codeclimate-test-reporter
|
|
79
57
|
requirement: !ruby/object:Gem::Requirement
|
|
80
58
|
requirements:
|
|
81
|
-
- -
|
|
59
|
+
- - ~>
|
|
82
60
|
- !ruby/object:Gem::Version
|
|
83
|
-
version: '0.
|
|
61
|
+
version: '0.4'
|
|
84
62
|
type: :development
|
|
85
63
|
prerelease: false
|
|
86
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
87
65
|
requirements:
|
|
88
|
-
- -
|
|
66
|
+
- - ~>
|
|
89
67
|
- !ruby/object:Gem::Version
|
|
90
|
-
version: '0.
|
|
68
|
+
version: '0.4'
|
|
91
69
|
- !ruby/object:Gem::Dependency
|
|
92
|
-
name:
|
|
70
|
+
name: github-markup
|
|
93
71
|
requirement: !ruby/object:Gem::Requirement
|
|
94
72
|
requirements:
|
|
95
|
-
- -
|
|
73
|
+
- - ~>
|
|
96
74
|
- !ruby/object:Gem::Version
|
|
97
|
-
version: '3
|
|
75
|
+
version: '1.3'
|
|
98
76
|
type: :development
|
|
99
77
|
prerelease: false
|
|
100
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
101
79
|
requirements:
|
|
102
|
-
- -
|
|
80
|
+
- - ~>
|
|
103
81
|
- !ruby/object:Gem::Version
|
|
104
|
-
version: '3
|
|
82
|
+
version: '1.3'
|
|
105
83
|
- !ruby/object:Gem::Dependency
|
|
106
|
-
name:
|
|
84
|
+
name: pry
|
|
107
85
|
requirement: !ruby/object:Gem::Requirement
|
|
108
86
|
requirements:
|
|
109
|
-
- -
|
|
87
|
+
- - ~>
|
|
110
88
|
- !ruby/object:Gem::Version
|
|
111
|
-
version: '
|
|
89
|
+
version: '0.10'
|
|
112
90
|
type: :development
|
|
113
91
|
prerelease: false
|
|
114
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
115
93
|
requirements:
|
|
116
|
-
- -
|
|
94
|
+
- - ~>
|
|
117
95
|
- !ruby/object:Gem::Version
|
|
118
|
-
version: '
|
|
96
|
+
version: '0.10'
|
|
119
97
|
- !ruby/object:Gem::Dependency
|
|
120
98
|
name: rake
|
|
121
99
|
requirement: !ruby/object:Gem::Requirement
|
|
122
100
|
requirements:
|
|
123
|
-
- -
|
|
101
|
+
- - ~>
|
|
124
102
|
- !ruby/object:Gem::Version
|
|
125
|
-
version: '10.
|
|
103
|
+
version: '10.5'
|
|
126
104
|
type: :development
|
|
127
105
|
prerelease: false
|
|
128
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
129
107
|
requirements:
|
|
130
|
-
- -
|
|
108
|
+
- - ~>
|
|
131
109
|
- !ruby/object:Gem::Version
|
|
132
|
-
version: '10.
|
|
110
|
+
version: '10.5'
|
|
133
111
|
- !ruby/object:Gem::Dependency
|
|
134
|
-
name:
|
|
112
|
+
name: redcarpet
|
|
135
113
|
requirement: !ruby/object:Gem::Requirement
|
|
136
114
|
requirements:
|
|
137
|
-
- -
|
|
115
|
+
- - ~>
|
|
138
116
|
- !ruby/object:Gem::Version
|
|
139
|
-
version: '
|
|
117
|
+
version: '3.2'
|
|
140
118
|
type: :development
|
|
141
119
|
prerelease: false
|
|
142
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
143
121
|
requirements:
|
|
144
|
-
- -
|
|
122
|
+
- - ~>
|
|
145
123
|
- !ruby/object:Gem::Version
|
|
146
|
-
version: '
|
|
124
|
+
version: '3.2'
|
|
147
125
|
- !ruby/object:Gem::Dependency
|
|
148
|
-
name:
|
|
126
|
+
name: rubocop
|
|
149
127
|
requirement: !ruby/object:Gem::Requirement
|
|
150
128
|
requirements:
|
|
151
|
-
- -
|
|
129
|
+
- - ~>
|
|
152
130
|
- !ruby/object:Gem::Version
|
|
153
|
-
version:
|
|
131
|
+
version: 0.40.0
|
|
154
132
|
type: :development
|
|
155
133
|
prerelease: false
|
|
156
134
|
version_requirements: !ruby/object:Gem::Requirement
|
|
157
135
|
requirements:
|
|
158
|
-
- -
|
|
136
|
+
- - ~>
|
|
159
137
|
- !ruby/object:Gem::Version
|
|
160
|
-
version:
|
|
138
|
+
version: 0.40.0
|
|
161
139
|
- !ruby/object:Gem::Dependency
|
|
162
|
-
name:
|
|
140
|
+
name: rspec
|
|
163
141
|
requirement: !ruby/object:Gem::Requirement
|
|
164
142
|
requirements:
|
|
165
|
-
- -
|
|
143
|
+
- - ~>
|
|
166
144
|
- !ruby/object:Gem::Version
|
|
167
|
-
version: '
|
|
145
|
+
version: '3.4'
|
|
168
146
|
type: :development
|
|
169
147
|
prerelease: false
|
|
170
148
|
version_requirements: !ruby/object:Gem::Requirement
|
|
171
149
|
requirements:
|
|
172
|
-
- -
|
|
150
|
+
- - ~>
|
|
173
151
|
- !ruby/object:Gem::Version
|
|
174
|
-
version: '
|
|
152
|
+
version: '3.4'
|
|
175
153
|
- !ruby/object:Gem::Dependency
|
|
176
|
-
name:
|
|
154
|
+
name: yard
|
|
177
155
|
requirement: !ruby/object:Gem::Requirement
|
|
178
156
|
requirements:
|
|
179
|
-
- -
|
|
157
|
+
- - ~>
|
|
180
158
|
- !ruby/object:Gem::Version
|
|
181
|
-
version: '0.
|
|
159
|
+
version: '0.8'
|
|
182
160
|
type: :development
|
|
183
161
|
prerelease: false
|
|
184
162
|
version_requirements: !ruby/object:Gem::Requirement
|
|
185
163
|
requirements:
|
|
186
|
-
- -
|
|
164
|
+
- - ~>
|
|
187
165
|
- !ruby/object:Gem::Version
|
|
188
|
-
version: '0.
|
|
166
|
+
version: '0.8'
|
|
189
167
|
description: Sensu plugins for lxc
|
|
190
|
-
email:
|
|
168
|
+
email: <sensu-users@googlegroups.com>
|
|
191
169
|
executables:
|
|
192
|
-
- check-lxc-status.rb
|
|
193
170
|
- check-lxc-memstat.rb
|
|
171
|
+
- check-lxc-status.rb
|
|
194
172
|
extensions: []
|
|
195
173
|
extra_rdoc_files: []
|
|
196
174
|
files:
|
|
@@ -217,17 +195,17 @@ require_paths:
|
|
|
217
195
|
- lib
|
|
218
196
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
219
197
|
requirements:
|
|
220
|
-
- -
|
|
198
|
+
- - ! '>='
|
|
221
199
|
- !ruby/object:Gem::Version
|
|
222
|
-
version:
|
|
200
|
+
version: 2.0.0
|
|
223
201
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
202
|
requirements:
|
|
225
|
-
- -
|
|
203
|
+
- - ! '>='
|
|
226
204
|
- !ruby/object:Gem::Version
|
|
227
205
|
version: '0'
|
|
228
206
|
requirements: []
|
|
229
207
|
rubyforge_project:
|
|
230
|
-
rubygems_version: 2.4.
|
|
208
|
+
rubygems_version: 2.4.5
|
|
231
209
|
signing_key:
|
|
232
210
|
specification_version: 4
|
|
233
211
|
summary: Sensu plugins for lxc
|
checksums.yaml.gz.sig
DELETED
|
Binary file
|
data.tar.gz.sig
DELETED
|
Binary file
|
metadata.gz.sig
DELETED
|
Binary file
|