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 +4 -4
- data/CHANGELOG.md +6 -2
- data/bin/check-mysql-query-result-count.rb +8 -2
- data/lib/sensu-plugins-mysql/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea1952c009e96cb2c930f04af422f2895c78e937
|
4
|
+
data.tar.gz: a68fbd6289920d08e5af527b1d207db3e3860ccd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c12ce6ea8b685d705e499f6c830de95f398279266d551621e96e8407e5ef9b86a3f3b1861811fb70b3b04a28cdbb97f35758a0d9735ef2d76ff51a0133d5f96
|
7
|
+
data.tar.gz: b08bf2c45b1f7af02ac485370eb26e8839f0d5312cc94a992e495b069e2186b1769d9aed4f25ef4e4b1c1f83c631560c5f071d429e89a03bb8285fd83f74fb88
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
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[:
|
84
|
+
db_user = config[:username]
|
79
85
|
db_pass = config[:password]
|
80
86
|
end
|
81
|
-
db = Mysql.real_connect(config[:
|
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]
|
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.
|
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-
|
11
|
+
date: 2017-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inifile
|