sensu-plugins-percona 0.0.2 → 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 +4 -4
- data/CHANGELOG.md +17 -3
- data/README.md +3 -3
- data/bin/check-wsrep-ready.rb +61 -0
- data/lib/sensu-plugins-percona/version.rb +2 -2
- metadata +16 -36
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -2
- metadata.gz.sig +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d955aab2683a68a994f13affa6805d0916d6c94
|
4
|
+
data.tar.gz: 23e6fc5c6c366dbd7dcce683dd44632b3bfef247
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8bc8d6f506c96d7ffdf93ea09efecf9fe5333f3c4868093c9a258ff94077016ad0ce09be299eb9a75088dcdcb90d42adc39311cd2427559b69125bfd5191957
|
7
|
+
data.tar.gz: 4d10962e58fd33f02f45241dc989419e35c80a5985efdca70b2eaff4d0766cb98b6fad70c4305a0c80c997ebc6bee7e8337ad93344f60e63d66235672416670b
|
data/CHANGELOG.md
CHANGED
@@ -3,14 +3,28 @@ 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
|
+
## [1.0.0] - 2016-09-25
|
9
|
+
### Added
|
10
|
+
- Ruby 2.3.0 support
|
11
|
+
- Add `check-wsrep-ready` to check the ready status of a cluster (@aberrios85)
|
12
|
+
|
13
|
+
### Removed
|
14
|
+
- Ruby 1.9.3 support
|
15
|
+
|
16
|
+
### Changed
|
17
|
+
- Update to rubocop 0.40 and cleanup
|
7
18
|
|
8
19
|
## [0.0.2] - 2015-07-14
|
9
20
|
### Changed
|
10
21
|
- updated sensu-plugin gem to 1.2.0
|
11
22
|
|
12
|
-
##
|
13
|
-
|
23
|
+
## 0.0.1 - 2015-06-11
|
14
24
|
### Added
|
15
25
|
- initial release
|
16
26
|
- added ability to use ini files
|
27
|
+
|
28
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-percona/compare/1.0.0...HEAD
|
29
|
+
[1.0.0]: https://github.com/sensu-plugins/sensu-plugins-percona/compare/0.0.2...1.0.0
|
30
|
+
[0.0.2]: https://github.com/sensu-plugins/sensu-plugins-percona/compare/0.0.1...0.0.2
|
data/README.md
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
## Sensu-Plugins-percona
|
2
2
|
|
3
|
-
[
|
3
|
+
[](https://travis-ci.org/sensu-plugins/sensu-plugins-percona)
|
4
4
|
[](http://badge.fury.io/rb/sensu-plugins-percona)
|
5
5
|
[](https://codeclimate.com/github/sensu-plugins/sensu-plugins-percona)
|
6
6
|
[](https://codeclimate.com/github/sensu-plugins/sensu-plugins-percona)
|
7
7
|
[](https://gemnasium.com/sensu-plugins/sensu-plugins-percona)
|
8
|
-
[ ](https://codeship.com/projects/82928)
|
9
8
|
|
10
9
|
## Functionality
|
11
10
|
|
12
11
|
## Files
|
13
12
|
* bin/check-percona-cluster-size.rb
|
14
13
|
* bin/metrics-percona-cluster.rb
|
14
|
+
* bin/check-wsrep-ready.rb
|
15
15
|
|
16
16
|
## Usage
|
17
17
|
|
18
18
|
## Installation
|
19
19
|
|
20
|
-
[Installation and Setup](
|
20
|
+
[Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
|
21
21
|
|
22
22
|
## Notes
|
@@ -0,0 +1,61 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# check-wsrep-ready
|
4
|
+
#
|
5
|
+
# DESCRIPTION:
|
6
|
+
# This plugin checks the wsrep_ready status of the cluster.
|
7
|
+
#
|
8
|
+
# OUTPUT:
|
9
|
+
# plain text
|
10
|
+
#
|
11
|
+
# PLATFORMS:
|
12
|
+
# Linux
|
13
|
+
#
|
14
|
+
# DEPENDENCIES:
|
15
|
+
# gem: sensu-plugin
|
16
|
+
# gem: mysql
|
17
|
+
#
|
18
|
+
# USAGE:
|
19
|
+
#
|
20
|
+
# NOTES:
|
21
|
+
# Based on the Percona Cluster Size Plugin by Chris Alexander <chris.alexander@import.io>, import.io; which is based on
|
22
|
+
# Based on the MySQL Health Plugin by Panagiotis Papadomitsos
|
23
|
+
#
|
24
|
+
# LICENSE:
|
25
|
+
# Copyright 2016 Antonio Berrios aberrios@psiclik.plus.com
|
26
|
+
# Released under the same terms as Sensu (the MIT license); see LICENSE
|
27
|
+
# for details.
|
28
|
+
#
|
29
|
+
|
30
|
+
require 'sensu-plugin/check/cli'
|
31
|
+
require 'mysql'
|
32
|
+
|
33
|
+
class CheckWsrepReady < Sensu::Plugin::Check::CLI
|
34
|
+
option :user,
|
35
|
+
description: 'MySQL User',
|
36
|
+
short: '-u USER',
|
37
|
+
long: '--user USER',
|
38
|
+
default: 'root'
|
39
|
+
|
40
|
+
option :password,
|
41
|
+
description: 'MySQL Password',
|
42
|
+
short: '-p PASS',
|
43
|
+
long: '--password PASS'
|
44
|
+
|
45
|
+
option :hostname,
|
46
|
+
description: 'Hostname to login to',
|
47
|
+
short: '-h HOST',
|
48
|
+
long: '--hostname HOST',
|
49
|
+
default: 'localhost'
|
50
|
+
|
51
|
+
def run
|
52
|
+
db = Mysql.real_connect(config[:hostname], config[:user], config[:password], config[:database])
|
53
|
+
wsrep_ready = db.query("SHOW STATUS LIKE 'wsrep_ready';").fetch_hash.fetch('Value')
|
54
|
+
critical "WSREP Ready is not ON. Is #{wsrep_ready}" if wsrep_ready != 'ON'
|
55
|
+
ok 'Cluster is OK!' if wsrep_ready == 'ON'
|
56
|
+
rescue Mysql::Error => e
|
57
|
+
critical "Percona MySQL check failed: #{e.error}"
|
58
|
+
ensure
|
59
|
+
db.close if db
|
60
|
+
end
|
61
|
+
end
|
metadata
CHANGED
@@ -1,51 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-percona
|
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-09-26 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: mysql
|
51
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,16 +98,16 @@ dependencies:
|
|
120
98
|
name: rubocop
|
121
99
|
requirement: !ruby/object:Gem::Requirement
|
122
100
|
requirements:
|
123
|
-
- -
|
101
|
+
- - "~>"
|
124
102
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
103
|
+
version: 0.40.0
|
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:
|
110
|
+
version: 0.40.0
|
133
111
|
- !ruby/object:Gem::Dependency
|
134
112
|
name: github-markup
|
135
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -217,8 +195,9 @@ dependencies:
|
|
217
195
|
description: Sensu percona plugins
|
218
196
|
email: "<sensu-users@googlegroups.com>"
|
219
197
|
executables:
|
220
|
-
- metrics-percona-cluster.rb
|
221
198
|
- check-percona-cluster-size.rb
|
199
|
+
- check-wsrep-ready.rb
|
200
|
+
- metrics-percona-cluster.rb
|
222
201
|
extensions: []
|
223
202
|
extra_rdoc_files: []
|
224
203
|
files:
|
@@ -226,6 +205,7 @@ files:
|
|
226
205
|
- LICENSE
|
227
206
|
- README.md
|
228
207
|
- bin/check-percona-cluster-size.rb
|
208
|
+
- bin/check-wsrep-ready.rb
|
229
209
|
- bin/metrics-percona-cluster.rb
|
230
210
|
- lib/sensu-plugins-percona.rb
|
231
211
|
- lib/sensu-plugins-percona/version.rb
|
@@ -247,7 +227,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
247
227
|
requirements:
|
248
228
|
- - ">="
|
249
229
|
- !ruby/object:Gem::Version
|
250
|
-
version:
|
230
|
+
version: 2.0.0
|
251
231
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
252
232
|
requirements:
|
253
233
|
- - ">="
|
@@ -255,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
255
235
|
version: '0'
|
256
236
|
requirements: []
|
257
237
|
rubyforge_project:
|
258
|
-
rubygems_version: 2.
|
238
|
+
rubygems_version: 2.5.1
|
259
239
|
signing_key:
|
260
240
|
specification_version: 4
|
261
241
|
summary: Sensu plugins for percona
|
checksums.yaml.gz.sig
DELETED
Binary file
|
data.tar.gz.sig
DELETED
metadata.gz.sig
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ěN���ݽ���S_5y��Ô`K.Я;i�.ٚdR�r����C���%��0"�7Ȃ��� 8��X�h���bw����gRL�d����z(�ME)�=�����ut�,�I�]�h��;H��t�/�e1�W8�t��ؿ�v��A+E��7��ȍ���˛�P��y�|}���|��z��V]�ڠE��T�P�(s�.�� �*E�%8�T��,h�I^;O�I�k��"8c_J$x��^���$`Ծm�%&
|