sensu-plugins-mssql 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f3d2217350ae1c8f5e6f5b97ffc8a6726fe1add2
4
+ data.tar.gz: 7c2e06d9873f183676264ece1d0eb2f24e3a7e9b
5
+ SHA512:
6
+ metadata.gz: e5d8689b33b392d5c1e5c352460499bc549b5522343c83d27320c36a7e5b20baebdf6472d1dbe8b12cdf99600756c9e4a1b28e91b0f5f993da5a93408daf5cb4
7
+ data.tar.gz: 73040e92bf6409a7838bf67889bca64863a4b5403917f6546f615e89587044917a1454f4588555d2ec2a410d9ca27477ed86874eca16c9385035bbb6af98c04d
data/CHANGELOG.md ADDED
File without changes
data/README.md ADDED
File without changes
@@ -0,0 +1,92 @@
1
+ #! /usr/bin/env ruby
2
+ # encoding: UTF-8
3
+ #
4
+ # metrics-memory
5
+ #
6
+ # DESCRIPTION:
7
+ #
8
+ # OUTPUT:
9
+ # metric data
10
+ #
11
+ # PLATFORMS:
12
+ # Linux
13
+ #
14
+ # DEPENDENCIES:
15
+ # gem: sensu-plugin
16
+ #
17
+ # USAGE:
18
+ # ./check-mssql-lag.rb
19
+ #
20
+
21
+ require 'sensu-plugin/check/cli'
22
+
23
+ class CheckMsSQLLag < Sensu::Plugin::Check::CLI
24
+ option(:master_host,
25
+ short: '-p',
26
+ long: '--primary-host=HOST',
27
+ description: 'Primary HOST')
28
+
29
+ option(:replica_host,
30
+ short: '-r',
31
+ long: '--replica_host=HOST',
32
+ description: 'Replica HOST',
33
+ default: 'localhost')
34
+
35
+ option(:port,
36
+ short: '-P',
37
+ long: '--port=PORT',
38
+ description: 'MsSQL port',
39
+ default: 1433)
40
+
41
+ option(:database,
42
+ short: '-d',
43
+ long: '--database=NAME',
44
+ description: 'Database NAME')
45
+
46
+ option(:user,
47
+ short: '-u',
48
+ long: '--user=USER',
49
+ description: 'Database USER')
50
+
51
+ option(:password,
52
+ short: '-P',
53
+ long: '--password=PASSWORD',
54
+ description: 'Database PASSWORD')
55
+
56
+ option(:ssl,
57
+ short: '-S',
58
+ long: '--ssl',
59
+ boolean: true,
60
+ description: 'Require SSL')
61
+
62
+ option(:warn,
63
+ short: '-w',
64
+ long: '--warning=VALUE',
65
+ description: 'Warning threshold for replication lag (in MB)',
66
+ default: 60)
67
+
68
+ option(:crit,
69
+ short: '-c',
70
+ long: '--critical=VALUE',
71
+ description: 'Critical threshold for replication lag (in seconds)',
72
+ default: 300)
73
+
74
+ option(:timeout,
75
+ short: '-T',
76
+ long: '--timeout',
77
+ default: nil,
78
+ description: 'Connection timeout (seconds)')
79
+
80
+ def run
81
+ delay = calculate_delay
82
+ critical if delay <= config[:critical]
83
+ warning if delay <= config[:warning]
84
+ ok
85
+ end
86
+
87
+ def calculate_delay
88
+ delay = 5
89
+ delay
90
+ end
91
+
92
+ end
@@ -0,0 +1,9 @@
1
+ module SensuPluginsMsSQL
2
+ module Version
3
+ MAJOR = 0
4
+ MINOR = 0
5
+ PATCH = 1
6
+
7
+ VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
+ end
9
+ end
@@ -0,0 +1 @@
1
+ require 'sensu-plugins-mssql/version'
metadata ADDED
@@ -0,0 +1,195 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sensu-plugins-mssql
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Sensu-Plugins and contributors
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-07-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: sensu-plugin
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.7'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.7'
41
+ - !ruby/object:Gem::Dependency
42
+ name: codeclimate-test-reporter
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.4'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.4'
55
+ - !ruby/object:Gem::Dependency
56
+ name: github-markup
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.3'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.10'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.10'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rake
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '10.5'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '10.5'
97
+ - !ruby/object:Gem::Dependency
98
+ name: redcarpet
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '3.2'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '3.2'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.40.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.40.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: rspec
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '3.4'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '3.4'
139
+ - !ruby/object:Gem::Dependency
140
+ name: yard
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '0.8'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '0.8'
153
+ description: Sensu plugins for Microsoft MsSQL
154
+ email: "<sensu-users@googlegroups.com>"
155
+ executables:
156
+ - check-mssql-lag.rb
157
+ extensions: []
158
+ extra_rdoc_files: []
159
+ files:
160
+ - CHANGELOG.md
161
+ - README.md
162
+ - bin/check-mssql-lag.rb
163
+ - lib/sensu-plugins-mssql.rb
164
+ - lib/sensu-plugins-mssql/version.rb
165
+ homepage: https://github.com/sensu-plugins/sensu-plugins-mssql
166
+ licenses:
167
+ - MIT
168
+ metadata:
169
+ maintainer: maraca
170
+ development_status: active
171
+ production_status: unstable - testing recommended
172
+ release_draft: 'false'
173
+ release_prerelease: 'false'
174
+ post_install_message: You can use the embedded Ruby by setting EMBEDDED_RUBY=true
175
+ in /etc/default/sensu
176
+ rdoc_options: []
177
+ require_paths:
178
+ - lib
179
+ required_ruby_version: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - ">="
182
+ - !ruby/object:Gem::Version
183
+ version: 1.9.3
184
+ required_rubygems_version: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: '0'
189
+ requirements: []
190
+ rubyforge_project:
191
+ rubygems_version: 2.6.10
192
+ signing_key:
193
+ specification_version: 4
194
+ summary: Sensu plugins for Microsoft MsSQL
195
+ test_files: []