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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ae79bd92c77ebed0aff90bcba5c26de353a8aa0
4
- data.tar.gz: fe5c370974c82d4106440361ccb722cf2e98e7e7
3
+ metadata.gz: af920c9b19b4ad7d365c342fe6946d3253df3540
4
+ data.tar.gz: ef5037674a6f5cf570684b62158a169e174ad245
5
5
  SHA512:
6
- metadata.gz: 4714de5772c058b8a871e12eb6a5676e4e472dcfb038080d62339bc27f1bdd8c3c40b7f62a69b11952ebe25dff3c02fead95e9ab092cde9e392d1bd05b273e86
7
- data.tar.gz: a712880079dcb874f7c5404a96589d1561e70290ea741d960b5c7129ac78cc39b67b932e934caf1d93e2fd17527acdb016d9d64f6a1be504614b15a65a665446
6
+ metadata.gz: 92fb247d3a3588db99bf16664a936f100afdf27a3ec37054e6d938a09a0f8ee1f88ce46d53672783b1d11dc2ce533600a538caa17274d4330b47a7030c787342
7
+ data.tar.gz: 19dd96724d81bbf9b1bd867c6addbb5a76615ec90c2d13a0be1ce281200d120145f2af76bf4edbd47fc09e25378d6fcc58373c307b19f3d6f7959e8882758ee4
@@ -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 username: config[:user], password: config[:password], host: config[:primary_host], database: config[:database]
92
- replica = TinyTds::Client.new username: config[:user], password: config[:password], host: config[:replica_host], database: config[:database]
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
@@ -2,7 +2,7 @@ module SensuPluginsMsSQL
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 4
5
+ PATCH = 5
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-mssql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
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-07-27 00:00:00.000000000 Z
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: '1.3'
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: '1.3'
40
+ version: 1.0.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement