master
json 361 lines 13.5 KB
Raw
1 {
2 "jsonSchema": {
3 "$schema": "http://json-schema.org/draft-07/schema#",
4 "title": "Microsoft SQL Server 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": 10
13 },
14 "dsn": {
15 "title": "DSN",
16 "description": "Microsoft SQL Server [Data Source Name](https://github.com/microsoft/go-mssqldb#connection-parameters-and-dsn). When `cloud_auth.provider` is `azure_ad`, use URL format with `sqlserver://` scheme.",
17 "type": "string",
18 "default": "sqlserver://localhost:1433"
19 },
20 "cloud_auth": {
21 "title": "Cloud auth",
22 "description": "Optional cloud authentication settings for Azure SQL.",
23 "type": "object",
24 "properties": {
25 "provider": {
26 "title": "Provider",
27 "description": "Cloud auth provider. Use `none` to disable cloud authentication.",
28 "type": "string",
29 "enum": [
30 "none",
31 "azure_ad"
32 ],
33 "default": "none"
34 }
35 },
36 "dependencies": {
37 "provider": {
38 "oneOf": [
39 {
40 "properties": {
41 "provider": {
42 "const": "none"
43 }
44 }
45 },
46 {
47 "properties": {
48 "provider": {
49 "const": "azure_ad"
50 },
51 "azure_ad": {
52 "title": "Azure AD",
53 "description": "Microsoft Entra (Azure AD) settings used when provider is `azure_ad`.",
54 "type": "object",
55 "properties": {
56 "mode": {
57 "title": "Mode",
58 "description": "Azure AD credential mode.",
59 "type": "string",
60 "enum": [
61 "service_principal",
62 "managed_identity",
63 "default"
64 ],
65 "default": "default"
66 }
67 },
68 "dependencies": {
69 "mode": {
70 "oneOf": [
71 {
72 "properties": {
73 "mode": {
74 "const": "service_principal"
75 },
76 "mode_service_principal": {
77 "title": "Service Principal",
78 "description": "Service principal settings used when mode is `service_principal`.",
79 "type": "object",
80 "properties": {
81 "tenant_id": {
82 "title": "Tenant ID",
83 "description": "Azure tenant ID.",
84 "type": "string"
85 },
86 "client_id": {
87 "title": "Client ID",
88 "description": "Service principal client ID.",
89 "type": "string"
90 },
91 "client_secret": {
92 "title": "Client Secret",
93 "description": "Service principal client secret.",
94 "type": "string",
95 "sensitive": true
96 }
97 },
98 "required": [
99 "tenant_id",
100 "client_id",
101 "client_secret"
102 ]
103 }
104 },
105 "required": [
106 "mode_service_principal"
107 ]
108 },
109 {
110 "properties": {
111 "mode": {
112 "const": "managed_identity"
113 },
114 "mode_managed_identity": {
115 "title": "Managed Identity",
116 "description": "Managed identity settings used when mode is `managed_identity`.",
117 "type": "object",
118 "properties": {
119 "client_id": {
120 "title": "Client ID",
121 "description": "Optional client ID of a user-assigned managed identity.",
122 "type": "string"
123 }
124 }
125 }
126 }
127 },
128 {
129 "properties": {
130 "mode": {
131 "const": "default"
132 }
133 }
134 }
135 ]
136 }
137 },
138 "required": [
139 "mode"
140 ]
141 }
142 },
143 "required": [
144 "azure_ad"
145 ]
146 }
147 ]
148 }
149 }
150 },
151 "vnode": {
152 "title": "Virtual Node",
153 "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).",
154 "type": "string",
155 "default": ""
156 },
157 "timeout": {
158 "title": "Timeout",
159 "description": "Query timeout, in seconds.",
160 "type": "number",
161 "minimum": 0.5,
162 "default": 5
163 },
164 "functions": {
165 "title": "Functions",
166 "description": "Configuration for Netdata functions exposed by this collector.",
167 "type": "object",
168 "properties": {
169 "top_queries": {
170 "title": "Top Queries",
171 "description": "Configuration for the top-queries function using SQL Server Query Store.",
172 "type": "object",
173 "properties": {
174 "disabled": {
175 "title": "Disabled",
176 "description": "Disable the top-queries function.",
177 "type": "boolean",
178 "default": false
179 },
180 "timeout": {
181 "title": "Timeout",
182 "description": "Query timeout in seconds. Set to 0 to use the collector's timeout.",
183 "type": "number",
184 "minimum": 0
185 },
186 "limit": {
187 "title": "Limit",
188 "description": "Maximum number of queries to return. Set to 0 to use the default (500).",
189 "type": "integer",
190 "minimum": 0,
191 "maximum": 5000,
192 "default": 500
193 },
194 "time_window_days": {
195 "title": "Time Window (Days)",
196 "description": "How many days of Query Store data to query. Set to 0 to use the default (7). Set to -1 to query all available data (not recommended for busy servers).",
197 "type": "integer",
198 "minimum": -1,
199 "default": 7
200 }
201 }
202 },
203 "deadlock_info": {
204 "title": "Deadlock Info",
205 "description": "Configuration for the deadlock-info function.",
206 "type": "object",
207 "properties": {
208 "disabled": {
209 "title": "Disabled",
210 "description": "Disable the deadlock-info function.",
211 "type": "boolean",
212 "default": false
213 },
214 "timeout": {
215 "title": "Timeout",
216 "description": "Query timeout in seconds. Set to 0 to use the collector's timeout.",
217 "type": "number",
218 "minimum": 0
219 },
220 "use_ring_buffer": {
221 "title": "Use Ring Buffer",
222 "description": "Use ring_buffer target instead of event_file for system_health session. Enable for Azure SQL Database without blob storage.",
223 "type": "boolean",
224 "default": false
225 }
226 }
227 },
228 "error_info": {
229 "title": "Error Info",
230 "description": "Configuration for the error-info function.",
231 "type": "object",
232 "properties": {
233 "disabled": {
234 "title": "Disabled",
235 "description": "Disable the error-info function.",
236 "type": "boolean",
237 "default": false
238 },
239 "timeout": {
240 "title": "Timeout",
241 "description": "Query timeout in seconds. Set to 0 to use the collector's timeout.",
242 "type": "number",
243 "minimum": 0
244 },
245 "session_name": {
246 "title": "Session Name",
247 "description": "Name of the Extended Events session that captures error_reported events.",
248 "type": "string",
249 "default": "netdata_errors"
250 },
251 "use_ring_buffer": {
252 "title": "Use Ring Buffer",
253 "description": "Use ring_buffer target instead of event_file. Enable for Azure SQL Database without blob storage.",
254 "type": "boolean",
255 "default": false
256 }
257 }
258 }
259 }
260 }
261 },
262 "required": [
263 "dsn"
264 ],
265 "additionalProperties": false,
266 "patternProperties": {
267 "^name$": {}
268 }
269 },
270 "uiSchema": {
271 "uiOptions": {
272 "fullPage": true
273 },
274 "dsn": {
275 "ui:placeholder": "sqlserver://user:password@localhost:1433"
276 },
277 "vnode": {
278 "ui:help": "Optional: Group metrics under a virtual node for multi-instance setups."
279 },
280 "timeout": {
281 "ui:help": "Accepts decimals for sub-second granularity (e.g., 0.5 for 500ms)."
282 },
283 "cloud_auth": {
284 "provider": {
285 "ui:widget": "radio",
286 "ui:options": {
287 "inline": true
288 }
289 },
290 "azure_ad": {
291 "mode": {
292 "ui:widget": "radio",
293 "ui:options": {
294 "inline": true
295 },
296 "ui:help": "Choose how Netdata gets Azure credentials.\n\n- `service_principal`: Use an Azure app / service principal. Requires `tenant_id`, `client_id`, and `client_secret` in `mode_service_principal`.\n- `managed_identity`: Use the managed identity attached to the Azure resource running Netdata. Set `mode_managed_identity.client_id` only for a user-assigned identity.\n- `default`: Use the Azure SDK `DefaultAzureCredential` chain. This automatically tries available Azure credential sources, such as environment-based credentials, managed identity, and local developer credentials.\n\nUse `service_principal` for explicit app credentials. Use `managed_identity` when Netdata runs on an Azure resource with an attached identity. Use `default` when you want Azure SDK auto-discovery or local development convenience."
297 },
298 "mode_service_principal": {
299 "client_secret": {
300 "ui:widget": "password"
301 }
302 }
303 }
304 },
305 "functions": {
306 "top_queries": {
307 "disabled": {
308 "ui:help": "WARNING: Query Store may contain unmasked PII (customer names, emails, IDs) in query text."
309 },
310 "time_window_days": {
311 "ui:help": "Limits Query Store data to recent days. Lower values improve performance on busy servers."
312 }
313 },
314 "deadlock_info": {
315 "disabled": {
316 "ui:help": "WARNING: Query text may contain unmasked sensitive literals. Requires VIEW SERVER STATE permission."
317 },
318 "use_ring_buffer": {
319 "ui:help": "Enable for Azure SQL Database or environments without event_file access. Ring buffer can be slower."
320 }
321 },
322 "error_info": {
323 "disabled": {
324 "ui:help": "WARNING: Error messages and query text may contain unmasked sensitive literals. Requires VIEW SERVER STATE permission."
325 },
326 "session_name": {
327 "ui:help": "The Extended Events session must be created by an administrator and include an event_file target capturing sqlserver.error_reported with sql_text action."
328 },
329 "use_ring_buffer": {
330 "ui:help": "Enable for Azure SQL Database or environments without event_file access. Ring buffer can be slower."
331 }
332 }
333 },
334 "ui:flavour": "tabs",
335 "ui:options": {
336 "tabs": [
337 {
338 "title": "Base",
339 "fields": [
340 "update_every",
341 "dsn",
342 "timeout",
343 "vnode"
344 ]
345 },
346 {
347 "title": "Cloud Auth",
348 "fields": [
349 "cloud_auth"
350 ]
351 },
352 {
353 "title": "Functions",
354 "fields": [
355 "functions"
356 ]
357 }
358 ]
359 }
360 }
361 }