sensu-plugins-mssql 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/check-mssql-lag.rb +6 -2
- data/lib/sensu-plugins-mssql/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af920c9b19b4ad7d365c342fe6946d3253df3540
|
4
|
+
data.tar.gz: ef5037674a6f5cf570684b62158a169e174ad245
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92fb247d3a3588db99bf16664a936f100afdf27a3ec37054e6d938a09a0f8ee1f88ce46d53672783b1d11dc2ce533600a538caa17274d4330b47a7030c787342
|
7
|
+
data.tar.gz: 19dd96724d81bbf9b1bd867c6addbb5a76615ec90c2d13a0be1ce281200d120145f2af76bf4edbd47fc09e25378d6fcc58373c307b19f3d6f7959e8882758ee4
|
data/bin/check-mssql-lag.rb
CHANGED
@@ -88,8 +88,12 @@ class CheckMsSQLLag < Sensu::Plugin::Check::CLI
|
|
88
88
|
end
|
89
89
|
|
90
90
|
def calculate_delay
|
91
|
-
primary = TinyTds::Client.new
|
92
|
-
|
91
|
+
primary = TinyTds::Client.new(username: config[:user], password: config[:password],
|
92
|
+
host: config[:primary_host], database: config[:database],
|
93
|
+
port: config[:port])
|
94
|
+
replica = TinyTds::Client.new(username: config[:user], password: config[:password],
|
95
|
+
host: config[:replica_host], database: config[:database],
|
96
|
+
port: config[:port])
|
93
97
|
sql = "SELECT TOP 1 DATEDIFF(SECOND, '1970-01-01', CreatedAt) As lag FROM [dbo].[Order] ORDER BY OrderID DESC;"
|
94
98
|
primary.execute(sql).each[0]['lag'] - replica.execute(sql).each[0]['lag']
|
95
99
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-mssql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
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-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: tiny_tds
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.0.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 1.0.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|