-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathwhitebox.yml
More file actions
65 lines (51 loc) · 1.61 KB
/
whitebox.yml
File metadata and controls
65 lines (51 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Whitebox Configuration
# ========================
#
# This YAML file configures monitoring scopes for external VPN services.
# Each scope defines an HTTP probe with validation rules.
scopes:
# Default monitoring scope (fallback)
default:
timeout: 5s
http:
max_redirects: 5
method: GET
# Custom request headers
headers:
User-Agent: "whitebox/1.0.0"
Accept: "text/plain,*/*"
# Request body (mutually exclusive with body_file)
# body: '{"status": "alive"}'
# File containing request body
# body_file: "./request-payload.json"
# Example check alive scope
check_alive:
timeout: 5s
http:
max_redirects: 5
method: POST
headers:
# Environment variables interpolation
Authorization: "Bearer ${BEARER_AUTH:-dXNlcjpwYXNz}"
Content-Type: "application/json"
body: '{"ping": true}'
# Response validation rules
fail_if:
# Fail if SSL/TLS handshake is performed
- mod: ssl
# Fail if HTTP status is NOT 200
- mod: status_code_matches
val: "200"
inv: true
# Fail if response body does NOT contain "alive" or "healthy"
- mod: body_matches_regexp
val: "alive|healthy"
inv: true
# Fail if JSON response.status != "ok" (CEL expression)
- mod: body_json_matches_cel
val: 'response.status == "ok"'
inv: true
# Fail if "Server" header does NOT match nginx/apache patterns
- mod: header_matches_regexp
val: "Server:\\s?nginx|Server:\\s?apache"
inv: true