hq-check-site 0.2.0 → 0.3.0
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.
- data/features/config-edge-cases.feature +1 -1
- data/features/headers-auth.feature +4 -4
- data/features/http-auth.feature +2 -2
- data/features/login-form.feature +1 -1
- data/features/response-match.feature +2 -2
- data/features/response-report.feature +2 -2
- data/features/timeout.feature +1 -1
- data/features/timings.feature +3 -3
- data/lib/hq/check-site/script.rb +13 -0
- metadata +4 -4
@@ -17,5 +17,5 @@ Feature: Function correctly in edge cases based on config file
|
|
17
17
|
Given one server which responds in 0 seconds
|
18
18
|
When check-site is run with config "no-path"
|
19
19
|
Then all servers should receive page requests
|
20
|
-
And the message should be "Site OK: 1 hosts found, 0.0s time | time=0s;2;4"
|
20
|
+
And the message should be "Site OK: 1 hosts found, 0.0s time | time=0.0s;2.0;4.0;0.0;10.0"
|
21
21
|
And the status should be 0
|
@@ -27,16 +27,16 @@ Feature: Authenticate via custom HTTP headers
|
|
27
27
|
</check-site-script>
|
28
28
|
"""
|
29
29
|
|
30
|
-
Scenario:
|
30
|
+
Scenario: HTTP auth success
|
31
31
|
Given one server which requires header based login
|
32
32
|
When check-site is run with config "headers-auth"
|
33
33
|
Then all servers should receive page requests
|
34
|
-
And the message should be "Site OK: 1 hosts found, 0.0s time"
|
34
|
+
And the message should be "Site OK: 1 hosts found, 0.0s time | time=0.0s;2.0;4.0;0.0;10.0"
|
35
35
|
And the status should be 0
|
36
36
|
|
37
|
-
Scenario:
|
37
|
+
Scenario: HTTP auth failure
|
38
38
|
Given one server which requires header based login
|
39
39
|
When check-site is run with config "default"
|
40
40
|
Then all servers should receive page requests
|
41
|
-
And the message should be "Site CRITICAL: 1 hosts found, 1 errors (500), 0.0s time"
|
41
|
+
And the message should be "Site CRITICAL: 1 hosts found, 1 errors (500), 0.0s time | time=0.0s;2.0;4.0;0.0;10.0"
|
42
42
|
And the status should be 2
|
data/features/http-auth.feature
CHANGED
@@ -17,12 +17,12 @@ Feature: Supply credentials via HTTP authentication
|
|
17
17
|
Given one server which requires username "USER" and password "PASS"
|
18
18
|
When check-site is run with config "http-auth"
|
19
19
|
Then all servers should receive page requests
|
20
|
-
And the message should be "Site OK: 1 hosts found, 0.0s time"
|
20
|
+
And the message should be "Site OK: 1 hosts found, 0.0s time | time=0.0s;2.0;4.0;0.0;10.0"
|
21
21
|
And the status should be 0
|
22
22
|
|
23
23
|
Scenario: Username and password are incorrect
|
24
24
|
Given one server which requires username "USER" and password "SECRET"
|
25
25
|
When check-site is run with config "http-auth"
|
26
26
|
Then all servers should receive page requests
|
27
|
-
And the message should be "Site CRITICAL: 1 hosts found, 1 errors (401), 0.0s time"
|
27
|
+
And the message should be "Site CRITICAL: 1 hosts found, 1 errors (401), 0.0s time | time=0.0s;2.0;4.0;0.0;10.0"
|
28
28
|
And the status should be 2
|
data/features/login-form.feature
CHANGED
@@ -24,5 +24,5 @@ Feature: Log in via an HTML form
|
|
24
24
|
Given one server which requires form based login with "USER" and "PASS"
|
25
25
|
When check-site is run with config "form-auth"
|
26
26
|
Then all servers should receive page requests
|
27
|
-
And the message should be "Site OK: 1 hosts found, 0.0s time"
|
27
|
+
And the message should be "Site OK: 1 hosts found, 0.0s time | time=0.0s;2.0;4.0;0.0;10.0"
|
28
28
|
And the status should be 0
|
@@ -17,7 +17,7 @@ Feature: Check for regex in HTTP response
|
|
17
17
|
Given one server which responds with "-yes-"
|
18
18
|
When check-site is run with config "regex"
|
19
19
|
Then all servers should receive page requests
|
20
|
-
And the message should be "Site OK: 1 hosts found, 0.0s time"
|
20
|
+
And the message should be "Site OK: 1 hosts found, 0.0s time | time=0.0s;2.0;4.0;0.0;10.0"
|
21
21
|
And the status should be 0
|
22
22
|
|
23
23
|
Scenario: Body does not contain regex
|
@@ -25,5 +25,5 @@ Feature: Check for regex in HTTP response
|
|
25
25
|
And one server which responds with "-no-"
|
26
26
|
When check-site is run with config "regex"
|
27
27
|
Then all servers should receive page requests
|
28
|
-
And the message should be "Site CRITICAL: 2 hosts found, 1 mismatches, 0.0s time"
|
28
|
+
And the message should be "Site CRITICAL: 2 hosts found, 1 mismatches, 0.0s time | time=0.0s;2.0;4.0;0.0;10.0"
|
29
29
|
And the status should be 2
|
@@ -21,7 +21,7 @@ Feature: Check for regex in HTTP response
|
|
21
21
|
When check-site is run with config "report"
|
22
22
|
|
23
23
|
Then all servers should receive page requests
|
24
|
-
And the message should be "Site CRITICAL: 2 hosts found, 1 errors (500), 0.0s time"
|
24
|
+
And the message should be "Site CRITICAL: 2 hosts found, 1 errors (500), 0.0s time | time=0.0s;2.0;4.0;0.0;10.0"
|
25
25
|
And the status should be 2
|
26
26
|
|
27
27
|
Scenario: One server to report
|
@@ -34,5 +34,5 @@ Feature: Check for regex in HTTP response
|
|
34
34
|
When check-site is run with config "report"
|
35
35
|
|
36
36
|
Then all servers should receive page requests
|
37
|
-
And the message should be "Site CRITICAL: 4 hosts found, 3 errors (500), 0.0s time, response 'def'"
|
37
|
+
And the message should be "Site CRITICAL: 4 hosts found, 3 errors (500), 0.0s time, response 'def' | time=0.0s;2.0;4.0;0.0;10.0"
|
38
38
|
And the status should be 2
|
data/features/timeout.feature
CHANGED
@@ -28,7 +28,7 @@ Feature: Handle timeout correctly
|
|
28
28
|
Given one server which responds in 0 seconds
|
29
29
|
When check-site is run with config "default"
|
30
30
|
Then all servers should receive page requests
|
31
|
-
And the message should be "Site OK: 1 hosts found, 0.0s time"
|
31
|
+
And the message should be "Site OK: 1 hosts found, 0.0s time | time=0.0s;2.0;4.0;0.0;10.0"
|
32
32
|
And the status should be 0
|
33
33
|
|
34
34
|
Scenario: Timeout expires
|
data/features/timings.feature
CHANGED
@@ -17,7 +17,7 @@ Feature: Return ok/warning/critical based on response time
|
|
17
17
|
Given one server which responds in 1 second
|
18
18
|
When check-site is run with config "default"
|
19
19
|
Then all servers should receive page requests
|
20
|
-
And the message should be "Site OK: 1 hosts found, 1.0s time"
|
20
|
+
And the message should be "Site OK: 1 hosts found, 1.0s time | time=1.0s;2.0;4.0;0.0;10.0"
|
21
21
|
And the status should be 0
|
22
22
|
|
23
23
|
Scenario: Site responds in warning time
|
@@ -25,7 +25,7 @@ Feature: Return ok/warning/critical based on response time
|
|
25
25
|
And one server which responds in 3 seconds
|
26
26
|
When check-site is run with config "default"
|
27
27
|
Then all servers should receive page requests
|
28
|
-
And the message should be "Site WARNING: 2 hosts found, 3.0s time (warning is 2.0)"
|
28
|
+
And the message should be "Site WARNING: 2 hosts found, 3.0s time (warning is 2.0) | time=3.0s;2.0;4.0;0.0;10.0"
|
29
29
|
And the status should be 1
|
30
30
|
|
31
31
|
Scenario: Site responds in critical time
|
@@ -34,5 +34,5 @@ Feature: Return ok/warning/critical based on response time
|
|
34
34
|
And one server which responds in 5 seconds
|
35
35
|
When check-site is run with config "default"
|
36
36
|
Then all servers should receive page requests
|
37
|
-
And the message should be "Site CRITICAL: 3 hosts found, 5.0s time (critical is 4.0)"
|
37
|
+
And the message should be "Site CRITICAL: 3 hosts found, 5.0s time (critical is 4.0) | time=5.0s;2.0;4.0;0.0;10.0"
|
38
38
|
And the status should be 2
|
data/lib/hq/check-site/script.rb
CHANGED
@@ -140,6 +140,19 @@ class Script < Tools::CheckScript
|
|
140
140
|
|
141
141
|
end
|
142
142
|
|
143
|
+
if @worst
|
144
|
+
|
145
|
+
performance \
|
146
|
+
"time",
|
147
|
+
@worst,
|
148
|
+
:units => "s",
|
149
|
+
:warning => @warning_time,
|
150
|
+
:critical => @critical_time,
|
151
|
+
:minimum => 0.0,
|
152
|
+
:maximum => @timeout_time
|
153
|
+
|
154
|
+
end
|
155
|
+
|
143
156
|
end
|
144
157
|
|
145
158
|
def check_address address
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hq-check-site
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hq-tools
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.4.2
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.4.2
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: libxml-ruby
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|