sensu-plugins-mysql 1.2.0 → 1.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 09befac0a6d69ea724280ceed0de5e745675a15b
4
- data.tar.gz: 1361386396355226ae7d80fc47353a7144de726b
3
+ metadata.gz: ea1952c009e96cb2c930f04af422f2895c78e937
4
+ data.tar.gz: a68fbd6289920d08e5af527b1d207db3e3860ccd
5
5
  SHA512:
6
- metadata.gz: 256cb9c8249af6be2343b98d2bb1e9aba3fcaec0c7eb11748dd7610061a16c85a3f0bf8efd63de185e36ccdc292955ff7e0d2b0d48540d9206e99d5b0d4547a5
7
- data.tar.gz: efe0cc759521f9e3883bc2b99119987fa8b1a83c029704f49e01315bd4380cbaae4586a48c3e9be41d65717e4454f975d4417734021f6c5adedb33dda8f370b9
6
+ metadata.gz: 7c12ce6ea8b685d705e499f6c830de95f398279266d551621e96e8407e5ef9b86a3f3b1861811fb70b3b04a28cdbb97f35758a0d9735ef2d76ff51a0133d5f96
7
+ data.tar.gz: b08bf2c45b1f7af02ac485370eb26e8839f0d5312cc94a992e495b069e2186b1769d9aed4f25ef4e4b1c1f83c631560c5f071d429e89a03bb8285fd83f74fb88
@@ -1,9 +1,12 @@
1
- #Change Log
1
+ # Change Log
2
2
  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
6
  ## [Unreleased]
7
+ ## [1.2.1] - 2017-05-03
8
+ ### Fixed
9
+ - Fix configuration for check-mysql-query-result-count.rb script (@athal7)
7
10
 
8
11
  ## [1.2.0] - 2017-03-23
9
12
  - Add check-mysql-query-result-count.rb script (@athal7)
@@ -54,7 +57,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
54
57
  ### Added
55
58
  - initial release
56
59
 
57
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-mysql/compare/1.2.0...HEAD
60
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-mysql/compare/1.2.1...HEAD
61
+ [1.2.1]: https://github.com/sensu-plugins/sensu-plugins-mysql/compare/1.2.0...1.2.1
58
62
  [1.2.0]: https://github.com/sensu-plugins/sensu-plugins-mysql/compare/1.1.0...1.2.0
59
63
  [1.1.0]: https://github.com/sensu-plugins/sensu-plugins-mysql/compare/1.0.0...1.1.0
60
64
  [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-mysql/compare/0.0.4...1.0.0
@@ -38,6 +38,12 @@ class MysqlQueryCountCheck < Sensu::Plugin::Check::CLI
38
38
  description: 'MySQL password',
39
39
  default: ''
40
40
 
41
+ option :database,
42
+ short: '-d DATABASE',
43
+ long: '--database DATABASE',
44
+ description: 'MySQL database',
45
+ required: true
46
+
41
47
  option :ini,
42
48
  short: '-i',
43
49
  long: '--ini VALUE',
@@ -75,10 +81,10 @@ class MysqlQueryCountCheck < Sensu::Plugin::Check::CLI
75
81
  db_user = section['user']
76
82
  db_pass = section['password']
77
83
  else
78
- db_user = config[:user]
84
+ db_user = config[:username]
79
85
  db_pass = config[:password]
80
86
  end
81
- db = Mysql.real_connect(config[:hostname], db_user, db_pass, config[:database], config[:port].to_i, config[:socket])
87
+ db = Mysql.real_connect(config[:host], db_user, db_pass, config[:database], config[:port].to_i, config[:socket])
82
88
  length = db.query(config[:query]).count
83
89
 
84
90
  if length >= config[:crit]
@@ -2,7 +2,7 @@ module SensuPluginsMySql
2
2
  module Version
3
3
  MAJOR = 1
4
4
  MINOR = 2
5
- PATCH = 0
5
+ PATCH = 1
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-mysql
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
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: 2017-03-24 00:00:00.000000000 Z
11
+ date: 2017-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inifile