sensu-plugins-percona 0.0.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 244b822c6dea38a79b1eea2bc1d380857a06f209
4
- data.tar.gz: 051db1c7388fd04c5b5173ea2c89be6fcdde094a
3
+ metadata.gz: 5d955aab2683a68a994f13affa6805d0916d6c94
4
+ data.tar.gz: 23e6fc5c6c366dbd7dcce683dd44632b3bfef247
5
5
  SHA512:
6
- metadata.gz: 086107025dfb355fe05c753fd336b0f17285a1b27f711e404eef9211d3ea22d1b5e9776959d5248155ef19a613cd039734f5d37523d901db7a7619e340b219c0
7
- data.tar.gz: 246b7b9a4f096ee803b5f0df063ac908c690e0031a0029d0c5c830abbacee4755174321f56d43f29385006fb4fa880f5f3d0fb7f9282122fc5ed138265bdb5c2
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][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
- ## [0.0.1] - 2015-06-11
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
- [ ![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-percona.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-percona)
3
+ [![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-percona.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-percona)
4
4
  [![Gem Version](https://badge.fury.io/rb/sensu-plugins-percona.svg)](http://badge.fury.io/rb/sensu-plugins-percona)
5
5
  [![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-percona/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-percona)
6
6
  [![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-percona/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-percona)
7
7
  [![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-percona.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-percona)
8
- [ ![Codeship Status for sensu-plugins/sensu-plugins-percona](https://codeship.com/projects/ebcee170-e948-0132-7604-26b28b7b5489/status?branch=master)](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](https://github.com/sensu-plugins/documentation/blob/master/user_docs/installation_instructions.md)
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
@@ -1,8 +1,8 @@
1
1
  module SensuPluginsPercona
2
2
  module Version
3
- MAJOR = 0
3
+ MAJOR = 1
4
4
  MINOR = 0
5
- PATCH = 2
5
+ PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  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.2
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.0
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.0
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: '0.30'
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: '0.30'
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: 1.9.3
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.4.6
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
@@ -1,2 +0,0 @@
1
- yKnӡ���s�ꀲG�9���̇�>QZ����������gį%51
2
- �����ٕ���ŵz��/�m���p�}+��}V�B���aC���7U��z,H΂�\*��?K�^Xz�لg)b
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�%&