nsca 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/nsca/check.rb +3 -3
- data/nsca.gemspec +1 -1
- data/test/test_nsca.rb +6 -6
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
data/lib/nsca/check.rb
CHANGED
@@ -170,14 +170,14 @@ module NSCA
|
|
170
170
|
end
|
171
171
|
|
172
172
|
class <<self
|
173
|
-
def
|
173
|
+
def new service, hostname = nil, perfdatas = nil
|
174
174
|
cl = Class.new Base
|
175
175
|
cl.init service, hostname, perfdatas
|
176
176
|
cl
|
177
177
|
end
|
178
178
|
|
179
|
-
def
|
180
|
-
cl =
|
179
|
+
def create service, hostname = nil, perfdatas = nil
|
180
|
+
cl = new service, hostname, perfdatas
|
181
181
|
clname = NSCA::Helper.class_name_gen service.to_s
|
182
182
|
self.const_set clname, cl if clname
|
183
183
|
cl
|
data/nsca.gemspec
CHANGED
data/test/test_nsca.rb
CHANGED
@@ -3,12 +3,12 @@ require 'helper'
|
|
3
3
|
class TestNSCA < Test::Unit::TestCase
|
4
4
|
class TestChecks
|
5
5
|
extend NSCA::Checks
|
6
|
-
perfdata :
|
7
|
-
perfdata :
|
8
|
-
perfdata :
|
9
|
-
check
|
10
|
-
check
|
11
|
-
check :
|
6
|
+
PD1 = perfdata :pd1_in_sec, :s, 10, 20, 0, 30
|
7
|
+
PD2 = perfdata :pd2_in_1, 1, 0.99, 0.98, 0, 1
|
8
|
+
PD3 = perfdata :pd3_count, :c, 3, 5, 0
|
9
|
+
T0 = check 'TestNSCA0', 'uxnags01-sbe.net.mobilkom.at'
|
10
|
+
T1 = check 'TestNSCA1', 'uxnags01-sbe.net.mobilkom.at', [PD1, PD2]
|
11
|
+
T2 = check :TestNSCA2, 'uxnags01-sbe.net.mobilkom.at', [PD1, PD2, PD3]
|
12
12
|
end
|
13
13
|
|
14
14
|
context 'our test server' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nsca
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -162,7 +162,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
162
162
|
version: '0'
|
163
163
|
segments:
|
164
164
|
- 0
|
165
|
-
hash: -
|
165
|
+
hash: -1034310641
|
166
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
167
|
none: false
|
168
168
|
requirements:
|