master
json 292 lines 8.43 KB
Raw
1 {
2 "jsonSchema": {
3 "$schema": "http://json-schema.org/draft-07/schema#",
4 "title": "HTTPCheck collector configuration.",
5 "type": "object",
6 "properties": {
7 "update_every": {
8 "title": "Update every",
9 "description": "Data collection interval, measured in seconds.",
10 "type": "integer",
11 "minimum": 1,
12 "default": 5
13 },
14 "url": {
15 "title": "URL",
16 "description": "The URL of the HTTP endpoint.",
17 "type": "string",
18 "format": "uri"
19 },
20 "timeout": {
21 "title": "Timeout",
22 "description": "The timeout in seconds for the HTTP request.",
23 "type": "number",
24 "minimum": 0.5,
25 "default": 1
26 },
27 "not_follow_redirects": {
28 "title": "Not follow redirects",
29 "description": "If set, the client will not follow HTTP redirects automatically.",
30 "type": "boolean"
31 },
32 "method": {
33 "title": "Method",
34 "description": "The [HTTP method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) to use for the request. An empty string means `GET`.",
35 "type": "string",
36 "default": "GET",
37 "examples": [
38 "GET",
39 "POST",
40 "PUT",
41 "PATCH"
42 ]
43 },
44 "body": {
45 "title": "Body",
46 "description": "The body content to send along with the HTTP request (if applicable).",
47 "type": "string"
48 },
49 "vnode": {
50 "title": "Vnode",
51 "description": "Associates this data collection job with a [Virtual Node](https://learn.netdata.cloud/docs/netdata-agent/configuration/organize-systems-metrics-and-alerts#virtual-nodes).",
52 "type": "string"
53 },
54 "status_accepted": {
55 "title": "Status code check",
56 "description": "Specifies the list of **HTTP response status codes** that are considered **acceptable**. Responses with status codes not included in this list will be categorized as 'bad status' in the status chart.",
57 "type": [
58 "array",
59 "null"
60 ],
61 "items": {
62 "title": "Code",
63 "type": "integer",
64 "minimum": 100,
65 "default": 200
66 },
67 "minItems": 1,
68 "uniqueItems": true,
69 "default": [
70 200
71 ]
72 },
73 "response_match": {
74 "title": "Content check",
75 "description": "Specifies a [regular expression](https://regex101.com/) pattern to match against the content (body) of the HTTP response. This check is performed only if the response's status code is accepted.",
76 "type": "string"
77 },
78 "header_match": {
79 "title": "Header check",
80 "description": "Specifies a set of rules to check for specific key-value pairs in the HTTP headers of the response.",
81 "type": [
82 "array",
83 "null"
84 ],
85 "items": {
86 "type": [
87 "object",
88 "null"
89 ],
90 "properties": {
91 "exclude": {
92 "title": "Exclude",
93 "description": "Determines whether the rule checks for the presence or absence of the specified key-value pair in the HTTP headers.",
94 "type": "boolean"
95 },
96 "key": {
97 "title": "Header key",
98 "description": "Specifies the exact name of the HTTP header to check for.",
99 "type": "string"
100 },
101 "value": {
102 "title": "Header value pattern",
103 "description": "Specifies the [matcher pattern](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/pkg/matcher#readme) to match against the value of the specified header.",
104 "type": "string"
105 }
106 },
107 "required": [
108 "key",
109 "value"
110 ]
111 }
112 },
113 "username": {
114 "title": "Username",
115 "description": "The username for basic authentication.",
116 "type": "string",
117 "sensitive": true
118 },
119 "password": {
120 "title": "Password",
121 "description": "The password for basic authentication.",
122 "type": "string",
123 "sensitive": true
124 },
125 "cookie_file": {
126 "title": "Cookie file",
127 "description": "Specifies the path to the file containing cookies. For more information about the cookie file format, see [cookie file format](https://everything.curl.dev/http/cookies/fileformat).",
128 "type": "string"
129 },
130 "bearer_token_file": {
131 "title": "Bearer Token File",
132 "description": "Path to a file containing a bearer token for HTTP authentication.",
133 "type": "string"
134 },
135 "force_http2": {
136 "title": "Force HTTP2",
137 "description": "If set, forces the use of HTTP/2 protocol for all requests, even over plain TCP (h2c).",
138 "type": "boolean"
139 },
140 "proxy_url": {
141 "title": "Proxy URL",
142 "description": "The URL of the proxy server.",
143 "type": "string"
144 },
145 "proxy_username": {
146 "title": "Proxy username",
147 "description": "The username for proxy authentication.",
148 "type": "string",
149 "sensitive": true
150 },
151 "proxy_password": {
152 "title": "Proxy password",
153 "description": "The password for proxy authentication.",
154 "type": "string",
155 "sensitive": true
156 },
157 "headers": {
158 "title": "Headers",
159 "description": "Additional HTTP headers to include in the request.",
160 "type": [
161 "object",
162 "null"
163 ],
164 "additionalProperties": {
165 "type": "string"
166 }
167 },
168 "tls_skip_verify": {
169 "title": "Skip TLS verification",
170 "description": "If set, TLS certificate verification will be skipped.",
171 "type": "boolean"
172 },
173 "tls_ca": {
174 "title": "TLS CA",
175 "description": "The path to the CA certificate file for TLS verification.",
176 "type": "string",
177 "pattern": "^$|^/"
178 },
179 "tls_cert": {
180 "title": "TLS certificate",
181 "description": "The path to the client certificate file for TLS authentication.",
182 "type": "string",
183 "pattern": "^$|^/"
184 },
185 "tls_key": {
186 "title": "TLS key",
187 "description": "The path to the client key file for TLS authentication.",
188 "type": "string",
189 "pattern": "^$|^/"
190 }
191 },
192 "required": [
193 "url",
194 "status_accepted"
195 ]
196 },
197 "uiSchema": {
198 "ui:flavour": "tabs",
199 "ui:options": {
200 "tabs": [
201 {
202 "title": "Base",
203 "fields": [
204 "update_every",
205 "url",
206 "timeout",
207 "not_follow_redirects",
208 "method",
209 "body",
210 "vnode"
211 ]
212 },
213 {
214 "title": "Checks",
215 "fields": [
216 "status_accepted",
217 "response_match",
218 "header_match"
219 ]
220 },
221 {
222 "title": "Auth",
223 "fields": [
224 "username",
225 "password",
226 "cookie_file"
227 ]
228 },
229 {
230 "title": "TLS",
231 "fields": [
232 "tls_skip_verify",
233 "tls_ca",
234 "tls_cert",
235 "tls_key"
236 ]
237 },
238 {
239 "title": "Proxy",
240 "fields": [
241 "proxy_url",
242 "proxy_username",
243 "proxy_password"
244 ]
245 },
246 {
247 "title": "Headers",
248 "fields": [
249 "headers"
250 ]
251 }
252 ]
253 },
254 "uiOptions": {
255 "fullPage": true
256 },
257 "bearer_token_file": {
258 "ui:help": "The token is sent in the Authorization header as `Bearer <token>`. **Takes priority over basic authentication**.",
259 "ui:widget": "hidden"
260 },
261 "force_http2": {
262 "ui:widget": "hidden"
263 },
264 "vnode": {
265 "ui:placeholder": "To use this option, first create a Virtual Node and then reference its name here."
266 },
267 "url": {
268 "ui:placeholder": "http://127.0.0.1"
269 },
270 "timeout": {
271 "ui:help": "Accepts decimals for precise control (e.g., type 1.5 for 1.5 seconds)."
272 },
273 "method": {
274 "ui:placeholder": "GET"
275 },
276 "body": {
277 "ui:widget": "textarea"
278 },
279 "username": {
280 "ui:widget": "password"
281 },
282 "proxy_username": {
283 "ui:widget": "password"
284 },
285 "password": {
286 "ui:widget": "password"
287 },
288 "proxy_password": {
289 "ui:widget": "password"
290 }
291 }
292 }