-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdevice-config-schema.coffee
76 lines (76 loc) · 2.6 KB
/
device-config-schema.coffee
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
66
67
68
69
70
71
72
73
74
75
76
module.exports = {
title: "pimatic-probe device config schemas"
HttpProbe: {
title: "HTTP/HTTPS Probe"
description: "Provides a probe for pinging HTTP/HTTPS services"
type: "object"
extensions: ["xLink", "xPresentLabel", "xAbsentLabel", "xAttributeOptions"]
properties:
url:
description: "HTTP/HTTPS Service URL to be probed"
type: "string"
verifyPeerCert:
description: "Enables or Disables verification of the peer certificates."
type: "boolean"
default: false
enableResponseTime:
description: "Adds an attribute to monitor response times"
type: "boolean"
default: false
interval:
description: "Polling interval for HTTP/HTTPS probes in seconds (minimum interval is 10 secs)"
type: "number"
default: 60
acceptedStatusCodes:
description: "HTTP Status Codes regarded as a successful probe result (set 0 for 'Accept All')"
type: "array"
default: [0]
items:
type: "number"
maxRedirects:
description: "Maximum number of HTTP redirects to follow automatically (set 0 to disable)"
type: "number"
default: 5
username:
description: "Username if HTTP Basic Authentication shall be applied"
type: "string"
default: ""
password:
description: "Password if HTTP Basic Authentication shall be applied"
type: "string"
default: ""
probeErrorLogLevel:
description: "Log level used for reporting probe errors"
enum: ["error", "warn", "info"]
default: "error"
},
TcpConnectProbe: {
title: "TCP Connect Probe"
description: "Provides a probe for a TCP connect to the given host and port"
type: "object"
extensions: ["xLink", "xPresentLabel", "xAbsentLabel", "xAttributeOptions"]
properties:
host:
description: "Hostname or IP address of the server"
type: "string"
port:
description: "Server port"
type: "number"
enableConnectTime:
description: "Adds an attribute to monitor connect times"
type: "boolean"
default: false
interval:
description: "Polling interval for TCP connect probes in seconds (minimum interval is 10 secs)"
type: "number"
default: 60
timeout:
description: "Timeout (in seconds) of inactivity on the TCP socket"
type: "number"
default: 10
probeErrorLogLevel:
description: "Log level used for reporting probe errors"
enum: ["error", "warn", "info"]
default: "error"
}
}