3
"info": {
4
"title": "Netdata API",
5
"description": "Real-time performance and health monitoring.",
6
- "version": "1.38"
6
+ "version": "1.38",
7
+ "contact": {
8
+ "name": "Netdata Agent API",
9
+ "email": "info@netdata.cloud",
10
+ "url": "https://netdata.cloud"
11
+ },
12
+ "license": {
13
+ "name": "GPL v3+",
14
+ "url": "https://github.com/netdata/netdata/blob/master/LICENSE"
15
+ }
16
},
17
+ "servers": [
18
+ {
19
+ "url": "https://registry.my-netdata.io"
20
+ },
21
+ {
22
+ "url": "http://registry.my-netdata.io"
23
+ },
24
+ {
25
+ "url": "http://localhost:19999"
26
+ }
27
+ ],
28
+ "tags": [
29
+ {
30
+ "name": "nodes",
31
+ "description": "Everything related to monitored nodes"
32
+ },
33
+ {
34
+ "name": "charts",
35
+ "description": "Everything related to chart instances - DO NOT USE IN NEW CODE - use contexts instead"
36
+ },
37
+ {
38
+ "name": "contexts",
39
+ "description": "Everything related contexts - in new code, use this instead of charts"
40
+ },
41
+ {
42
+ "name": "data",
43
+ "description": "Everything related to data queries"
44
+ },
45
+ {
46
+ "name": "badges",
47
+ "description": "Everything related to dynamic badges based on metric data"
48
+ },
49
+ {
50
+ "name": "weights",
51
+ "description": "Everything related to scoring / weighting metrics"
52
+ },
53
+ {
54
+ "name": "functions",
55
+ "description": "Everything related to functions"
56
+ },
57
+ {
58
+ "name": "alerts",
59
+ "description": "Everything related to alerts"
60
+ },
61
+ {
62
+ "name": "management",
63
+ "description": "Everything related to managing netdata agents"
64
+ }
65
+ ],
66
"paths": {
67
+ "/api/v2/nodes": {
68
+ "get": {
69
+ "operationId": "getNodes2",
70
+ "tags": [
71
+ "nodes"
72
+ ],
73
+ "summary": "Nodes Info v2",
74
+ "description": "Get a list of all nodes hosted by this Netdata agent.\n",
75
+ "parameters": [
76
+ {
77
+ "$ref": "#/components/parameters/scopeNodes"
78
+ },
79
+ {
80
+ "$ref": "#/components/parameters/scopeContexts"
81
+ },
82
+ {
83
+ "$ref": "#/components/parameters/filterNodes"
84
+ },
85
+ {
86
+ "$ref": "#/components/parameters/filterContexts"
87
+ }
88
+ ],
89
+ "responses": {
90
+ "200": {
91
+ "description": "OK",
92
+ "content": {
93
+ "application/json": {
94
+ "schema": {
95
+ "description": "`/api/v2/nodes` response for all nodes hosted by a Netdata agent.\n",
96
+ "type": "object",
97
+ "properties": {
98
+ "api": {
99
+ "$ref": "#/components/schemas/api"
100
+ },
101
+ "agents": {
102
+ "$ref": "#/components/schemas/agents"
103
+ },
104
+ "versions": {
105
+ "$ref": "#/components/schemas/versions"
106
+ },
107
+ "nodes": {
108
+ "type": "array",
109
+ "items": {
110
+ "$ref": "#/components/schemas/nodeFull"
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
119
+ }
120
+ },
121
+ "/api/v2/contexts": {
122
+ "get": {
123
+ "operationId": "getContexts2",
124
+ "tags": [
125
+ "contexts"
126
+ ],
127
+ "summary": "Contexts Info v2",
128
+ "description": "Get a list of all contexts, across all nodes, hosted by this Netdata agent.\n",
129
+ "parameters": [
130
+ {
131
+ "$ref": "#/components/parameters/scopeNodes"
132
+ },
133
+ {
134
+ "$ref": "#/components/parameters/scopeContexts"
135
+ },
136
+ {
137
+ "$ref": "#/components/parameters/filterNodes"
138
+ },
139
+ {
140
+ "$ref": "#/components/parameters/filterContexts"
141
+ }
142
+ ],
143
+ "responses": {
144
+ "200": {
145
+ "description": "OK",
146
+ "content": {
147
+ "application/json": {
148
+ "schema": {
149
+ "$ref": "#/components/schemas/contexts2"
150
+ }
151
+ }
152
+ }
153
+ }
154
+ }
155
+ }
156
+ },
157
+ "/api/v2/q": {
158
+ "get": {
159
+ "operationId": "q2",
160
+ "tags": [
161
+ "contexts"
162
+ ],
163
+ "summary": "Full Text Search v2",
164
+ "description": "Get a list of contexts, across all nodes, hosted by this Netdata agent, matching a string expression\n",
165
+ "parameters": [
166
+ {
167
+ "name": "q",
168
+ "in": "query",
169
+ "description": "The strings to search for, formatted as a simple pattern",
170
+ "required": true,
171
+ "schema": {
172
+ "type": "string",
173
+ "format": "simple pattern"
174
+ }
175
+ },
176
+ {
177
+ "$ref": "#/components/parameters/scopeNodes"
178
+ },
179
+ {
180
+ "$ref": "#/components/parameters/scopeContexts"
181
+ },
182
+ {
183
+ "$ref": "#/components/parameters/filterNodes"
184
+ },
185
+ {
186
+ "$ref": "#/components/parameters/filterContexts"
187
+ }
188
+ ],
189
+ "responses": {
190
+ "200": {
191
+ "description": "OK",
192
+ "content": {
193
+ "application/json": {
194
+ "schema": {
195
+ "$ref": "#/components/schemas/contexts2"
196
+ }
197
+ }
198
+ }
199
+ }
200
+ }
201
+ }
202
+ },
203
"/api/v1/info": {
204
"get": {
11
- "summary": "Get netdata basic information",
205
+ "operationId": "getNodeInfo1",
206
+ "tags": [
207
+ "nodes"
208
+ ],
209
+ "summary": "Node Info v1",
210
"description": "The info endpoint returns basic information about netdata. It provides:\n* netdata version\n* netdata unique id\n* list of hosts mirrored (includes itself)\n* Operating System, Virtualization, K8s nodes and Container technology information\n* List of active collector plugins and modules\n* Streaming information\n* number of alarms in the host\n * number of alarms in normal state\n * number of alarms in warning state\n * number of alarms in critical state\n",
211
"responses": {
212
"200": {
227
},
228
"/api/v1/charts": {
229
"get": {
32
- "summary": "Get a list of all charts available at the server",
230
+ "operationId": "getNodeCharts1",
231
+ "tags": [
232
+ "charts"
233
+ ],
234
+ "summary": "List all charts v1 - EOL",
235
"description": "The charts endpoint returns a summary about all charts stored in the netdata server.",
236
"responses": {
237
"200": {
249
},
250
"/api/v1/chart": {
251
"get": {
50
- "summary": "Get info about a specific chart",
252
+ "operationId": "getNodeChart1",
253
+ "tags": [
254
+ "charts"
255
+ ],
256
+ "summary": "Get one chart v1 - EOL",
257
"description": "The chart endpoint returns detailed information about a chart.",
258
"parameters": [
259
{
54
- "name": "chart",
55
- "in": "query",
56
- "description": "The id of the chart as returned by the /charts call.",
57
- "required": true,
58
- "schema": {
59
- "type": "string",
60
- "format": "as returned by /charts",
61
- "default": "system.cpu"
62
- }
260
+ "$ref": "#/components/parameters/chart"
261
}
262
],
263
"responses": {
282
},
283
"/api/v1/contexts": {
284
"get": {
87
- "summary": "Get a list of all contexts available at the server",
285
+ "operationId": "getNodeContexts1",
286
+ "tags": [
287
+ "contexts"
288
+ ],
289
+ "summary": "Get a list of all node contexts available v1",
290
"description": "The contexts endpoint returns a summary about all contexts stored in the netdata server.",
291
"parameters": [
292
{
91
- "name": "options",
92
- "in": "query",
93
- "description": "Options that affect data generation.",
94
- "required": false,
95
- "allowEmptyValue": true,
96
- "schema": {
97
- "type": "array",
98
- "items": {
99
- "type": "string",
100
- "enum": [
101
- "full",
102
- "all",
103
- "charts",
104
- "dimensions",
105
- "labels",
106
- "uuids",
107
- "queue",
108
- "flags",
109
- "deleted",
110
- "deepscan"
111
- ]
112
- },
113
- "default": [
114
- "full"
115
- ]
116
- }
293
+ "$ref": "#/components/parameters/dimensions"
294
},
295
{
119
- "name": "after",
120
- "in": "query",
121
- "description": "limit the results on context having data after this timestamp.",
122
- "required": false,
123
- "schema": {
124
- "type": "number",
125
- "format": "integer"
126
- }
296
+ "$ref": "#/components/parameters/chart_label_key"
297
},
298
{
129
- "name": "before",
130
- "in": "query",
131
- "description": "limit the results on context having data before this timestamp.",
132
- "required": false,
133
- "schema": {
134
- "type": "number",
135
- "format": "integer"
136
- }
299
+ "$ref": "#/components/parameters/chart_labels_filter"
300
},
301
{
139
- "name": "chart_label_key",
140
- "in": "query",
141
- "description": "a simple pattern matching charts label keys (use comma or pipe as separator)",
142
- "required": false,
143
- "allowEmptyValue": true,
144
- "schema": {
145
- "type": "string"
146
- }
302
+ "$ref": "#/components/parameters/contextOptions1"
303
},
304
{
149
- "name": "chart_labels_filter",
150
- "in": "query",
151
- "description": "a simple pattern matching charts label key and values (use colon for equality, comma or pipe as separator)",
152
- "required": false,
153
- "allowEmptyValue": true,
154
- "schema": {
155
- "type": "string"
156
- }
305
+ "$ref": "#/components/parameters/after"
306
},
307
{
159
- "name": "dimensions",
160
- "in": "query",
161
- "description": "a simple pattern matching dimensions (use comma or pipe as separator)",
162
- "required": false,
163
- "allowEmptyValue": true,
164
- "schema": {
165
- "type": "string"
166
- }
308
+ "$ref": "#/components/parameters/before"
309
}
310
],
311
"responses": {
324
},
325
"/api/v1/context": {
326
"get": {
327
+ "operationId": "getNodeContext1",
328
+ "tags": [
329
+ "contexts"
330
+ ],
331
"summary": "Get info about a specific context",
186
- "description": "The context endpoint returns detailed information about a given context.",
332
+ "description": "The context endpoint returns detailed information about a given context.\nThe `context` parameter is required for this call.\n",
333
"parameters": [
334
{
189
- "name": "context",
190
- "in": "query",
191
- "description": "The id of the context as returned by the /contexts call.",
192
- "required": true,
193
- "schema": {
194
- "type": "string",
195
- "format": "as returned by /contexts",
196
- "default": "system.cpu"
197
- }
335
+ "$ref": "#/components/parameters/context"
336
},
337
{
200
- "name": "options",
201
- "in": "query",
202
- "description": "Options that affect data generation.",
203
- "required": false,
204
- "allowEmptyValue": true,
205
- "schema": {
206
- "type": "array",
207
- "items": {
208
- "type": "string",
209
- "enum": [
210
- "full",
211
- "all",
212
- "charts",
213
- "dimensions",
214
- "labels",
215
- "uuids",
216
- "queue",
217
- "flags",
218
- "deleted",
219
- "deepscan"
220
- ]
221
- },
222
- "default": [
223
- "full"
224
- ]
225
- }
338
+ "$ref": "#/components/parameters/dimensions"
339
},
340
{
228
- "name": "after",
229
- "in": "query",
230
- "description": "limit the results on context having data after this timestamp.",
231
- "required": false,
232
- "schema": {
233
- "type": "number",
234
- "format": "integer"
235
- }
341
+ "$ref": "#/components/parameters/chart_label_key"
342
},
343
{
238
- "name": "before",
239
- "in": "query",
240
- "description": "limit the results on context having data before this timestamp.",
241
- "required": false,
242
- "schema": {
243
- "type": "number",
244
- "format": "integer"
245
- }
344
+ "$ref": "#/components/parameters/chart_labels_filter"
345
},
346
{
248
- "name": "chart_label_key",
249
- "in": "query",
250
- "description": "a simple pattern matching charts label keys (use comma or pipe as separator)",
251
- "required": false,
252
- "allowEmptyValue": true,
253
- "schema": {
254
- "type": "string"
255
- }
347
+ "$ref": "#/components/parameters/contextOptions1"
348
},
349
{
258
- "name": "chart_labels_filter",
259
- "in": "query",
260
- "description": "a simple pattern matching charts label key and values (use colon for equality, comma or pipe as separator)",
261
- "required": false,
262
- "allowEmptyValue": true,
263
- "schema": {
264
- "type": "string"
265
- }
350
+ "$ref": "#/components/parameters/after"
351
},
352
{
268
- "name": "dimensions",
269
- "in": "query",
270
- "description": "a simple pattern matching dimensions (use comma or pipe as separator)",
271
- "required": false,
272
- "allowEmptyValue": true,
273
- "schema": {
274
- "type": "string"
275
- }
353
+ "$ref": "#/components/parameters/before"
354
}
355
],
356
"responses": {
373
}
374
}
375
},
298
- "/api/v1/alarm_variables": {
376
+ "/api/v2/data": {
377
"get": {
300
- "summary": "List variables available to configure alarms for a chart",
301
- "description": "Returns the basic information of a chart and all the variables that can be used in alarm and template health configurations for the particular chart or family.",
378
+ "operationId": "dataQuery2",
379
+ "tags": [
380
+ "data"
381
+ ],
382
+ "summary": "Data Query v2",
383
+ "description": "Multi-node, multi-context, multi-instance, multi-dimension data queries, with time and metric aggregation.\n",
384
"parameters": [
385
{
304
- "name": "chart",
386
+ "name": "group_by",
387
"in": "query",
306
- "description": "The id of the chart as returned by the /charts call.",
307
- "required": true,
308
- "schema": {
309
- "type": "string",
310
- "format": "as returned by /charts",
311
- "default": "system.cpu"
312
- }
313
- }
314
- ],
315
- "responses": {
316
- "200": {
317
- "description": "A javascript object with information about the chart and the available variables.",
318
- "content": {
319
- "application/json": {
320
- "schema": {
321
- "$ref": "#/components/schemas/alarm_variables"
322
- }
323
- }
324
- }
325
- },
326
- "400": {
327
- "description": "Bad request - the body will include a message stating what is wrong."
328
- },
329
- "404": {
330
- "description": "No chart with the given id is found."
331
- },
332
- "500": {
333
- "description": "Internal server error. This usually means the server is out of memory."
334
- }
335
- }
336
- }
337
- },
338
- "/api/v2/data": {
339
- "get": {
340
- "summary": "Query metrics data",
341
- "description": "Multi-node, multi-context, multi-instance, multi-dimension data queries, with time and metric aggregation.\n",
342
- "parameters": [
343
- {
344
- "name": "scope_nodes",
345
- "in": "query",
346
- "description": "A simple pattern limiting the nodes scope of the query. The scope controls both data and metadata response. The simple pattern is checked against the nodes' machine guid, node id, hostname. The default nodes scope is all nodes for which this agent has data for. Usually the nodes scope is used to slice the entire dashboard (e.g. the Global Nodes Selector at the Netdata Cloud overview dashboard). Both positive and negative simple pattern expressions are supported.\n",
347
- "required": false,
348
- "schema": {
349
- "type": "string",
350
- "format": "simple pattern",
351
- "default": "*"
352
- }
353
- },
354
- {
355
- "name": "scope_contexts",
356
- "in": "query",
357
- "description": "A simple pattern limiting the contexts scope of the query. The scope controls both data and metadata response. The default contexts scope is all contexts for which this agent has data for. Usually the contexts scope is used to slice charts of the dashboard (e.g. each context based chart has its own contexts scope, limiting the chart to all the instances of the selected contexts). Both positive and negative simple pattern expressions are supported.\n",
358
- "required": false,
359
- "schema": {
360
- "type": "string",
361
- "format": "simple pattern",
362
- "default": "*"
363
- }
364
- },
365
- {
366
- "name": "nodes",
367
- "in": "query",
368
- "description": "A simple pattern matching the nodes to be queried. This only controls the data response, not the metadata. The simple pattern is checked against the nodes' machine guid, node id, hostname. The default nodes selector is all the nodes matched by the nodes scope. Both positive and negative simple pattern expressions are supported.\n",
369
- "required": false,
370
- "schema": {
371
- "type": "string",
372
- "format": "simple pattern",
373
- "default": "*"
374
- }
375
- },
376
- {
377
- "name": "contexts",
378
- "in": "query",
379
- "description": "A simple pattern matching the contexts to be queried. This only controls the data response, not the metadata. Both positive and negative simple pattern expressions are supported.\n",
380
- "required": false,
381
- "schema": {
382
- "type": "string",
383
- "format": "simple pattern",
384
- "default": "*"
385
- }
386
- },
387
- {
388
- "name": "instances",
389
- "in": "query",
390
- "description": "A simple pattern matching the instances to be queried. The simple pattern is checked against the instance `id`, the instance `name`, the fully qualified name of the instance `id` and `name`, like `instance@machine_guid`, where `instance` is either its `id` or `name`. Both positive and negative simple pattern expressions are supported.\n",
391
- "required": false,
392
- "schema": {
393
- "type": "string",
394
- "format": "simple pattern",
395
- "default": "*"
396
- }
397
- },
398
- {
399
- "name": "labels",
400
- "in": "query",
401
- "description": "A simple pattern matching the labels to be queried. The simple pattern is checked against `name:value` of all the labels of all the eligible instances (as filtered by all the above: scope nodes, scope contexts, nodes, contexts and instances). Negative simple patterns should not be used in this filter.\n",
402
- "required": false,
403
- "schema": {
404
- "type": "string",
405
- "format": "simple pattern",
406
- "default": "*"
407
- }
408
- },
409
- {
410
- "name": "alerts",
411
- "in": "query",
412
- "description": "A simple pattern matching the alerts to be queried. The simple pattern is checked against the `name` of alerts and the combination of `name:status`, when status is one of `CLEAR`, `WARNING`, `CRITICAL`, `REMOVED`, `UNDEFINED`, `UNINITIALIZED`, of all the alerts of all the eligible instances (as filtered by all the above). A negative simple pattern will exclude the instances having the labels matched.\n",
413
- "required": false,
414
- "schema": {
415
- "type": "string",
416
- "format": "simple pattern",
417
- "default": "*"
418
- }
419
- },
420
- {
421
- "name": "dimensions",
422
- "in": "query",
423
- "description": "A simple patterns matching the dimensions to be queried. The simple pattern is checked against and `id` and the `name` of the dimensions of the eligible instances (as filtered by all the above). Both positive and negative simple pattern expressions are supported.\n",
424
- "required": false,
425
- "schema": {
426
- "type": "string",
427
- "format": "simple pattern",
428
- "default": "*"
429
- }
430
- },
431
- {
432
- "name": "before",
433
- "in": "query",
434
- "description": "The end timestamp (unix epoch) of the data query, or a negative number specifying the number of seconds\nin the past relative now.\n",
435
- "required": false,
436
- "schema": {
437
- "type": "number",
438
- "format": "integer",
439
- "default": 0
440
- }
441
- },
442
- {
443
- "name": "after",
444
- "in": "query",
445
- "description": "The start timestamp (unix epoch) of the data query, or a negative number specifying the number of seconds\nin the past relative to parameter `before`.\n",
446
- "required": false,
447
- "schema": {
448
- "type": "number",
449
- "format": "integer",
450
- "default": 0
451
- }
452
- },
453
- {
454
- "name": "points",
455
- "in": "query",
456
- "description": "The number of points to be returned. If not given, or it is <= 0, or it is bigger than the points stored in the database for the given duration, all the available collected values for the given duration will be returned.\n",
457
- "required": false,
458
- "schema": {
459
- "type": "number",
460
- "format": "integer",
461
- "default": 0
462
- }
463
- },
464
- {
465
- "name": "group_by",
466
- "in": "query",
467
- "description": "A comma separated list of the groupings required.\nAll possible values can be combined together, except `selected`. If `selected` is given in the list, all others are ignored.\nThe order they are placed in the list is currently ignored.\n",
468
- "required": false,
388
+ "description": "A comma separated list of the groupings required.\nAll possible values can be combined together, except `selected`. If `selected` is given in the list, all others are ignored.\nThe order they are placed in the list is currently ignored.\n",
389
+ "required": false,
390
"schema": {
391
"type": "array",
392
"items": {
420
{
421
"name": "aggregation",
422
"in": "query",
502
- "description": "The aggregation function to apply when grouping metrics together.\n",
423
+ "description": "The aggregation function to apply when grouping metrics together.\nWhen option `raw` is given, `average` and `avg` behave like `sum` and the caller is expected to calculate the average.\n",
424
"required": false,
425
"schema": {
426
"type": "string",
435
}
436
},
437
{
517
- "name": "time_group",
518
- "in": "query",
519
- "description": "Time aggregation function. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. methods supported \"min\", \"max\", \"average\", \"sum\", \"incremental-sum\". \"max\" is actually calculated on the absolute value collected (so it works for both positive and negative dimensions to return the most extreme value in either direction).\n",
520
- "required": true,
521
- "schema": {
522
- "type": "string",
523
- "enum": [
524
- "min",
525
- "max",
526
- "avg",
527
- "average",
528
- "median",
529
- "stddev",
530
- "sum",
531
- "incremental-sum",
532
- "ses",
533
- "des",
534
- "cv",
535
- "countif",
536
- "percentile",
537
- "percentile25",
538
- "percentile50",
539
- "percentile75",
540
- "percentile80",
541
- "percentile90",
542
- "percentile95",
543
- "percentile97",
544
- "percentile98",
545
- "percentile99",
546
- "trimmed-mean",
547
- "trimmed-mean1",
548
- "trimmed-mean2",
549
- "trimmed-mean3",
550
- "trimmed-mean5",
551
- "trimmed-mean10",
552
- "trimmed-mean15",
553
- "trimmed-mean20",
554
- "trimmed-mean25",
555
- "trimmed-median",
556
- "trimmed-median1",
557
- "trimmed-median2",
558
- "trimmed-median3",
559
- "trimmed-median5",
560
- "trimmed-median10",
561
- "trimmed-median15",
562
- "trimmed-median20",
563
- "trimmed-median25"
564
- ],
565
- "default": "average"
566
- }
438
+ "$ref": "#/components/parameters/scopeNodes"
439
},
440
{
569
- "name": "time_group_options",
570
- "in": "query",
571
- "description": "When the group function supports additional parameters, this field can be used to pass them to it. Currently `countif`, `trimmed-mean`, `trimmed-median` and `percentile` support this. For `countif` the string may start with `<`, `<=`, `<:`, `<>`, `!=`, `>`, `>=`, `>:`. For all others just a number is expected.\n",
572
- "required": false,
573
- "schema": {
574
- "type": "string"
575
- }
441
+ "$ref": "#/components/parameters/scopeContexts"
442
},
443
{
578
- "name": "time_resampling",
579
- "in": "query",
580
- "description": "For incremental values that are \"per second\", this value is used to resample them to \"per minute` (60) or \"per hour\" (3600). It can only be used in conjunction with group=average.\n",
581
- "required": false,
582
- "schema": {
583
- "type": "number",
584
- "format": "integer",
585
- "default": 0
586
- }
444
+ "$ref": "#/components/parameters/filterNodes"
445
},
446
{
589
- "name": "timeout",
590
- "in": "query",
591
- "description": "Specify a timeout value in milliseconds after which the agent will abort the query and return a 503 error. A value of 0 indicates no timeout.\n",
592
- "required": false,
593
- "schema": {
594
- "type": "number",
595
- "format": "integer",
596
- "default": 0
597
- }
447
+ "$ref": "#/components/parameters/filterContexts"
448
},
449
{
600
- "name": "format",
601
- "in": "query",
602
- "description": "The format of the data to be returned.\n",
603
- "required": true,
604
- "allowEmptyValue": false,
605
- "schema": {
606
- "type": "string",
607
- "enum": [
608
- "json",
609
- "json2",
610
- "jsonp",
611
- "csv",
612
- "tsv",
613
- "tsv-excel",
614
- "ssv",
615
- "ssvcomma",
616
- "datatable",
617
- "datasource",
618
- "html",
619
- "markdown",
620
- "array",
621
- "csvjsonarray"
622
- ],
623
- "default": "json2"
624
- }
450
+ "$ref": "#/components/parameters/filterInstances"
451
},
452
{
627
- "name": "options",
628
- "in": "query",
629
- "description": "Options that affect data generation.\n`raw` changes the output so that the values can be aggregated across multiple such queries.\n",
630
- "required": false,
631
- "allowEmptyValue": false,
632
- "schema": {
633
- "type": "array",
634
- "items": {
635
- "type": "string",
636
- "enum": [
637
- "raw",
638
- "nonzero",
639
- "flip",
640
- "min2max",
641
- "seconds",
642
- "milliseconds",
643
- "abs",
644
- "absolute",
645
- "null2zero",
646
- "percentage",
647
- "unaligned",
648
- "match-ids",
649
- "match-names",
650
- "anomaly-bit",
651
- "group-by-labels"
652
- ]
653
- },
654
- "default": [
655
- "seconds",
656
- "jsonwrap"
657
- ]
658
- }
453
+ "$ref": "#/components/parameters/filterLabels"
454
},
455
{
661
- "name": "tier",
662
- "in": "query",
663
- "description": "Use only the specified database tier.\n",
664
- "required": false,
665
- "schema": {
666
- "type": "number",
667
- "format": "integer"
668
- }
456
+ "$ref": "#/components/parameters/filterAlerts"
457
},
458
{
671
- "name": "callback",
672
- "in": "query",
673
- "description": "For JSONP responses, the callback function name.\n",
674
- "required": false,
675
- "schema": {
676
- "type": "string"
677
- }
459
+ "$ref": "#/components/parameters/filterDimensions"
460
},
461
{
680
- "name": "filename",
681
- "in": "query",
682
- "description": "Add `Content-Disposition: attachment; filename=` header to the response, that will instruct the browser to save the response with the given filename.\"\n",
683
- "required": false,
684
- "schema": {
685
- "type": "string"
686
- }
462
+ "$ref": "#/components/parameters/after"
463
},
464
{
689
- "name": "tqx",
690
- "in": "query",
691
- "description": "[Google Visualization API](https://developers.google.com/chart/interactive/docs/dev/implementing_data_source?hl=en) formatted parameter.\n",
692
- "required": false,
693
- "schema": {
694
- "type": "string"
695
- }
465
+ "$ref": "#/components/parameters/before"
466
+ },
467
+ {
468
+ "$ref": "#/components/parameters/points"
469
+ },
470
+ {
471
+ "$ref": "#/components/parameters/tier"
472
+ },
473
+ {
474
+ "$ref": "#/components/parameters/dataQueryOptions"
475
+ },
476
+ {
477
+ "$ref": "#/components/parameters/dataTimeGroup2"
478
+ },
479
+ {
480
+ "$ref": "#/components/parameters/dataTimeGroupOptions2"
481
+ },
482
+ {
483
+ "$ref": "#/components/parameters/dataTimeResampling2"
484
+ },
485
+ {
486
+ "$ref": "#/components/parameters/dataFormat2"
487
+ },
488
+ {
489
+ "$ref": "#/components/parameters/timeoutMS"
490
+ },
491
+ {
492
+ "$ref": "#/components/parameters/callback"
493
+ },
494
+ {
495
+ "$ref": "#/components/parameters/filename"
496
+ },
497
+ {
498
+ "$ref": "#/components/parameters/tqx"
499
}
500
],
501
"responses": {
502
"200": {
700
- "description": "The call was successful. The response includes the data in the format requested. Swagger2.0 does not process the discriminator field to show polymorphism. The response will be one of the sub-types of the data-schema according to the chosen format, e.g. json -> data_json.\n",
503
+ "description": "The call was successful. The response includes the data in the format requested.\n",
504
"content": {
505
"application/json": {
506
"schema": {
704
- "$ref": "#/components/schemas/data_json2"
507
+ "oneOf": [
508
+ {
509
+ "$ref": "#/components/schemas/jsonwrap2"
510
+ },
511
+ {
512
+ "$ref": "#/components/schemas/data_json_formats2"
513
+ }
514
+ ]
515
+ }
516
+ },
517
+ "text/plain": {
518
+ "schema": {
519
+ "type": "string",
520
+ "format": "according to the format requested."
521
+ }
522
+ },
523
+ "text/html": {
524
+ "schema": {
525
+ "type": "string",
526
+ "format": "html"
527
+ }
528
+ },
529
+ "application/x-javascript": {
530
+ "schema": {
531
+ "type": "string",
532
+ "format": "javascript"
533
}
534
}
535
}
545
},
546
"/api/v1/data": {
547
"get": {
720
- "summary": "Get collected data for a specific chart",
721
- "description": "The data endpoint returns data stored in the round robin database of a chart.",
548
+ "operationId": "dataQuery1",
549
+ "tags": [
550
+ "data"
551
+ ],
552
+ "summary": "Data Query v1 - Single node, single chart or context queries. without group-by.",
553
+ "description": "Query metric data of a chart or context of a node and return a dataset having time-series data for all dimensions available.\nFor group-by functionality, use `/api/v2/data`.\nAt least a `chart` or a `context` have to be given for the data query to be executed.\n",
554
"parameters": [
555
{
724
- "name": "chart",
725
- "in": "query",
726
- "description": "The id of the chart as returned by the /charts call. Note chart or context must be specified",
727
- "required": false,
728
- "allowEmptyValue": false,
729
- "schema": {
730
- "type": "string",
731
- "format": "as returned by /charts",
732
- "default": "system.cpu"
733
- }
556
+ "$ref": "#/components/parameters/chart"
557
},
558
{
736
- "name": "context",
737
- "in": "query",
738
- "description": "The context of the chart as returned by the /charts call. Note chart or context must be specified",
739
- "required": false,
740
- "allowEmptyValue": false,
741
- "schema": {
742
- "type": "string",
743
- "format": "as returned by /charts"
744
- }
559
+ "$ref": "#/components/parameters/context"
560
},
561
{
747
- "name": "dimension",
748
- "in": "query",
749
- "description": "Zero, one or more dimension ids or names, as returned by the /chart call, separated with comma or pipe. Netdata simple patterns are supported.",
750
- "required": false,
751
- "allowEmptyValue": false,
752
- "schema": {
753
- "type": "array",
754
- "items": {
755
- "type": "string",
756
- "format": "as returned by /charts"
757
- }
758
- }
562
+ "$ref": "#/components/parameters/dimension"
563
},
564
{
761
- "name": "after",
762
- "in": "query",
763
- "description": "This parameter can either be an absolute timestamp specifying the starting point of the data to be returned, or a relative number of seconds (negative, relative to parameter: before). Netdata will assume it is a relative number if it is less that 3 years (in seconds). If not specified the default is -600 seconds. Netdata will adapt this parameter to the boundaries of the round robin database unless the allow_past option is specified.",
764
- "required": true,
765
- "allowEmptyValue": false,
766
- "schema": {
767
- "type": "number",
768
- "format": "integer",
769
- "default": -600
770
- }
565
+ "$ref": "#/components/parameters/chart_label_key"
566
},
567
{
773
- "name": "before",
774
- "in": "query",
775
- "description": "This parameter can either be an absolute timestamp specifying the ending point of the data to be returned, or a relative number of seconds (negative), relative to the last collected timestamp. Netdata will assume it is a relative number if it is less than 3 years (in seconds). Netdata will adapt this parameter to the boundaries of the round robin database. The default is zero (i.e. the timestamp of the last value collected).",
776
- "required": false,
777
- "schema": {
778
- "type": "number",
779
- "format": "integer",
780
- "default": 0
781
- }
568
+ "$ref": "#/components/parameters/chart_labels_filter"
569
},
570
{
784
- "name": "points",
785
- "in": "query",
786
- "description": "The number of points to be returned. If not given, or it is <= 0, or it is bigger than the points stored in the round robin database for this chart for the given duration, all the available collected values for the given duration will be returned.",
787
- "required": true,
788
- "allowEmptyValue": false,
789
- "schema": {
790
- "type": "number",
791
- "format": "integer",
792
- "default": 20
793
- }
571
+ "$ref": "#/components/parameters/after"
572
},
573
{
796
- "name": "chart_label_key",
797
- "in": "query",
798
- "description": "Specify the chart label keys that need to match for context queries as comma separated values. At least one matching key is needed to match the corresponding chart.",
799
- "required": false,
800
- "allowEmptyValue": false,
801
- "schema": {
802
- "type": "string",
803
- "format": "key1,key2,key3"
804
- }
574
+ "$ref": "#/components/parameters/before"
575
},
576
{
807
- "name": "chart_labels_filter",
808
- "in": "query",
809
- "description": "Specify the chart label keys and values to match for context queries. All keys/values need to match for the chart to be included in the query. The labels are specified as key1:value1,key2:value2",
810
- "required": false,
811
- "allowEmptyValue": false,
812
- "schema": {
813
- "type": "string",
814
- "format": "key1:value1,key2:value2,key3:value3"
815
- }
577
+ "$ref": "#/components/parameters/points"
578
},
579
{
818
- "name": "group",
819
- "in": "query",
820
- "description": "The grouping method. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. methods supported \"min\", \"max\", \"average\", \"sum\", \"incremental-sum\". \"max\" is actually calculated on the absolute value collected (so it works for both positive and negative dimensions to return the most extreme value in either direction).",
821
- "required": true,
822
- "allowEmptyValue": false,
823
- "schema": {
824
- "type": "string",
825
- "enum": [
826
- "min",
827
- "max",
828
- "average",
829
- "median",
830
- "stddev",
831
- "sum",
832
- "incremental-sum",
833
- "ses",
834
- "des",
835
- "cv",
836
- "countif",
837
- "percentile",
838
- "percentile25",
839
- "percentile50",
840
- "percentile75",
841
- "percentile80",
842
- "percentile90",
843
- "percentile95",
844
- "percentile97",
845
- "percentile98",
846
- "percentile99",
847
- "trimmed-mean",
848
- "trimmed-mean1",
849
- "trimmed-mean2",
850
- "trimmed-mean3",
851
- "trimmed-mean5",
852
- "trimmed-mean10",
853
- "trimmed-mean15",
854
- "trimmed-mean20",
855
- "trimmed-mean25",
856
- "trimmed-median",
857
- "trimmed-median1",
858
- "trimmed-median2",
859
- "trimmed-median3",
860
- "trimmed-median5",
861
- "trimmed-median10",
862
- "trimmed-median15",
863
- "trimmed-median20",
864
- "trimmed-median25"
865
- ],
866
- "default": "average"
867
- }
580
+ "$ref": "#/components/parameters/tier"
581
},
582
{
870
- "name": "group_options",
871
- "in": "query",
872
- "description": "When the group function supports additional parameters, this field can be used to pass them to it. Currently only \"countif\" supports this.",
873
- "required": false,
874
- "allowEmptyValue": false,
875
- "schema": {
876
- "type": "string"
877
- }
583
+ "$ref": "#/components/parameters/dataQueryOptions"
584
},
585
{
880
- "name": "gtime",
881
- "in": "query",
882
- "description": "The grouping number of seconds. This is used in conjunction with group=average to change the units of metrics (ie when the data is per-second, setting gtime=60 will turn them to per-minute).",
883
- "required": false,
884
- "allowEmptyValue": false,
885
- "schema": {
886
- "type": "number",
887
- "format": "integer",
888
- "default": 0
889
- }
586
+ "$ref": "#/components/parameters/dataFormat1"
587
},
588
{
892
- "name": "timeout",
893
- "in": "query",
894
- "description": "Specify a timeout value in milliseconds after which the agent will abort the query and return a 503 error. A value of 0 indicates no timeout.",
895
- "required": false,
896
- "allowEmptyValue": false,
897
- "schema": {
898
- "type": "number",
899
- "format": "integer",
900
- "default": 0
901
- }
589
+ "$ref": "#/components/parameters/dataTimeGroup1"
590
},
591
{
904
- "name": "format",
905
- "in": "query",
906
- "description": "The format of the data to be returned.",
907
- "required": true,
908
- "allowEmptyValue": false,
909
- "schema": {
910
- "type": "string",
911
- "enum": [
912
- "json",
913
- "jsonp",
914
- "csv",
915
- "tsv",
916
- "tsv-excel",
917
- "ssv",
918
- "ssvcomma",
919
- "datatable",
920
- "datasource",
921
- "html",
922
- "markdown",
923
- "array",
924
- "csvjsonarray"
925
- ],
926
- "default": "json"
927
- }
592
+ "$ref": "#/components/parameters/dataTimeGroupOptions1"
593
},
594
{
930
- "name": "options",
931
- "in": "query",
932
- "description": "Options that affect data generation.",
933
- "required": false,
934
- "allowEmptyValue": false,
935
- "schema": {
936
- "type": "array",
937
- "items": {
938
- "type": "string",
939
- "enum": [
940
- "nonzero",
941
- "flip",
942
- "jsonwrap",
943
- "min2max",
944
- "seconds",
945
- "milliseconds",
946
- "abs",
947
- "absolute",
948
- "absolute-sum",
949
- "null2zero",
950
- "objectrows",
951
- "google_json",
952
- "percentage",
953
- "unaligned",
954
- "match-ids",
955
- "match-names",
956
- "allow_past",
957
- "anomaly-bit"
958
- ]
959
- },
960
- "default": [
961
- "seconds",
962
- "jsonwrap"
963
- ]
964
- }
595
+ "$ref": "#/components/parameters/dataTimeResampling1"
596
},
597
{
967
- "name": "callback",
968
- "in": "query",
969
- "description": "For JSONP responses, the callback function name.",
970
- "required": false,
971
- "allowEmptyValue": true,
972
- "schema": {
973
- "type": "string"
974
- }
598
+ "$ref": "#/components/parameters/timeoutMS"
599
},
600
{
977
- "name": "filename",
978
- "in": "query",
979
- "description": "Add Content-Disposition: attachment; filename= header to the response, that will instruct the browser to save the response with the given filename.",
980
- "required": false,
981
- "allowEmptyValue": true,
982
- "schema": {
983
- "type": "string"
984
- }
601
+ "$ref": "#/components/parameters/callback"
602
},
603
{
987
- "name": "tqx",
988
- "in": "query",
989
- "description": "[Google Visualization API](https://developers.google.com/chart/interactive/docs/dev/implementing_data_source?hl=en) formatted parameter.",
990
- "required": false,
991
- "allowEmptyValue": true,
992
- "schema": {
993
- "type": "string"
994
- }
604
+ "$ref": "#/components/parameters/filename"
605
+ },
606
+ {
607
+ "$ref": "#/components/parameters/tqx"
608
}
609
],
610
"responses": {
611
"200": {
999
- "description": "The call was successful. The response includes the data in the format requested. Swagger2.0 does not process the discriminator field to show polymorphism. The response will be one of the sub-types of the data-schema according to the chosen format, e.g. json -> data_json.",
612
+ "description": "The call was successful. The response includes the data in the format requested.\n",
613
"content": {
614
"application/json": {
615
"schema": {
1003
- "$ref": "#/components/schemas/data"
616
+ "oneOf": [
617
+ {
618
+ "$ref": "#/components/schemas/jsonwrap1"
619
+ },
620
+ {
621
+ "$ref": "#/components/schemas/data_json_formats1"
622
+ }
623
+ ]
624
+ }
625
+ },
626
+ "text/plain": {
627
+ "schema": {
628
+ "type": "string",
629
+ "format": "according to the format requested."
630
+ }
631
+ },
632
+ "text/html": {
633
+ "schema": {
634
+ "type": "string",
635
+ "format": "html"
636
+ }
637
+ },
638
+ "application/x-javascript": {
639
+ "schema": {
640
+ "type": "string",
641
+ "format": "javascript"
642
}
643
}
644
}
655
}
656
}
657
},
1020
- "/api/v1/badge.svg": {
658
+ "/api/v1/allmetrics": {
659
"get": {
1022
- "summary": "Generate a badge in form of SVG image for a chart (or dimension)",
1023
- "description": "Successful responses are SVG images.",
660
+ "operationId": "allMetrics1",
661
+ "tags": [
662
+ "data"
663
+ ],
664
+ "summary": "All Metrics v1 - Fetch latest value for all metrics",
665
+ "description": "The `allmetrics` endpoint returns the latest value of all metrics maintained for a netdata node.\n",
666
"parameters": [
667
{
1026
- "name": "chart",
668
+ "name": "format",
669
"in": "query",
1028
- "description": "The id of the chart as returned by the /charts call.",
670
+ "description": "The format of the response to be returned.",
671
"required": true,
1030
- "allowEmptyValue": false,
672
"schema": {
673
"type": "string",
1033
- "format": "as returned by /charts",
1034
- "default": "system.cpu"
674
+ "enum": [
675
+ "shell",
676
+ "prometheus",
677
+ "prometheus_all_hosts",
678
+ "json"
679
+ ],
680
+ "default": "shell"
681
}
682
},
683
{
1038
- "name": "alarm",
684
+ "name": "filter",
685
"in": "query",
1040
- "description": "The name of an alarm linked to the chart.",
686
+ "description": "Allows to filter charts out using simple patterns.",
687
"required": false,
1042
- "allowEmptyValue": true,
688
"schema": {
689
"type": "string",
690
"format": "any text"
691
}
692
},
693
{
1049
- "name": "dimension",
694
+ "name": "variables",
695
"in": "query",
1051
- "description": "Zero, one or more dimension ids, as returned by the /chart call.",
696
+ "description": "When enabled, netdata will expose various system configuration variables.\n",
697
"required": false,
1053
- "allowEmptyValue": false,
698
"schema": {
1055
- "type": "array",
1056
- "items": {
1057
- "type": "string",
1058
- "format": "as returned by /charts"
1059
- }
699
+ "type": "string",
700
+ "enum": [
701
+ "yes",
702
+ "no"
703
+ ],
704
+ "default": "no"
705
}
706
},
707
{
1063
- "name": "after",
708
+ "name": "help",
709
"in": "query",
1065
- "description": "This parameter can either be an absolute timestamp specifying the starting point of the data to be returned, or a relative number of seconds, to the last collected timestamp. Netdata will assume it is a relative number if it is smaller than the duration of the round robin database for this chart. So, if the round robin database is 3600 seconds, any value from -3600 to 3600 will trigger relative arithmetics. Netdata will adapt this parameter to the boundaries of the round robin database.",
1066
- "required": true,
1067
- "allowEmptyValue": false,
710
+ "description": "Enable or disable HELP lines in prometheus output.\n",
711
+ "required": false,
712
"schema": {
1069
- "type": "number",
1070
- "format": "integer",
1071
- "default": -600
713
+ "type": "string",
714
+ "enum": [
715
+ "yes",
716
+ "no"
717
+ ],
718
+ "default": "no"
719
}
720
},
721
{
1075
- "name": "before",
722
+ "name": "types",
723
"in": "query",
1077
- "description": "This parameter can either be an absolute timestamp specifying the ending point of the data to be returned, or a relative number of seconds, to the last collected timestamp. Netdata will assume it is a relative number if it is smaller than the duration of the round robin database for this chart. So, if the round robin database is 3600 seconds, any value from -3600 to 3600 will trigger relative arithmetics. Netdata will adapt this parameter to the boundaries of the round robin database.",
724
+ "description": "Enable or disable TYPE lines in prometheus output.\n",
725
"required": false,
726
"schema": {
1080
- "type": "number",
1081
- "format": "integer",
1082
- "default": 0
727
+ "type": "string",
728
+ "enum": [
729
+ "yes",
730
+ "no"
731
+ ],
732
+ "default": "no"
733
}
734
},
735
{
1086
- "name": "group",
736
+ "name": "timestamps",
737
"in": "query",
1088
- "description": "The grouping method. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. methods are supported \"min\", \"max\", \"average\", \"sum\", \"incremental-sum\". \"max\" is actually calculated on the absolute value collected (so it works for both positive and negative dimensions to return the most extreme value in either direction).",
1089
- "required": true,
1090
- "allowEmptyValue": false,
738
+ "description": "Enable or disable timestamps in prometheus output.\n",
739
+ "required": false,
740
"schema": {
741
"type": "string",
742
"enum": [
1094
- "min",
1095
- "max",
1096
- "average",
1097
- "median",
1098
- "stddev",
1099
- "sum",
1100
- "incremental-sum",
1101
- "ses",
1102
- "des",
1103
- "cv",
1104
- "countif",
1105
- "percentile",
1106
- "percentile25",
1107
- "percentile50",
1108
- "percentile75",
1109
- "percentile80",
1110
- "percentile90",
1111
- "percentile95",
1112
- "percentile97",
1113
- "percentile98",
1114
- "percentile99",
1115
- "trimmed-mean",
1116
- "trimmed-mean1",
1117
- "trimmed-mean2",
1118
- "trimmed-mean3",
1119
- "trimmed-mean5",
1120
- "trimmed-mean10",
1121
- "trimmed-mean15",
1122
- "trimmed-mean20",
1123
- "trimmed-mean25",
1124
- "trimmed-median",
1125
- "trimmed-median1",
1126
- "trimmed-median2",
1127
- "trimmed-median3",
1128
- "trimmed-median5",
1129
- "trimmed-median10",
1130
- "trimmed-median15",
1131
- "trimmed-median20",
1132
- "trimmed-median25"
743
+ "yes",
744
+ "no"
745
],
1134
- "default": "average"
746
+ "default": "yes"
747
}
748
},
749
{
1138
- "name": "options",
750
+ "name": "names",
751
"in": "query",
1140
- "description": "Options that affect data generation.",
752
+ "description": "When enabled netdata will report dimension names. When disabled netdata will report dimension IDs. The default is controlled in netdata.conf.\n",
753
"required": false,
1142
- "allowEmptyValue": true,
754
"schema": {
1144
- "type": "array",
1145
- "items": {
1146
- "type": "string",
1147
- "enum": [
1148
- "abs",
1149
- "absolute",
1150
- "display-absolute",
1151
- "absolute-sum",
1152
- "null2zero",
1153
- "percentage",
1154
- "unaligned",
1155
- "anomaly-bit"
1156
- ]
1157
- },
1158
- "default": [
1159
- "absolute"
1160
- ]
755
+ "type": "string",
756
+ "enum": [
757
+ "yes",
758
+ "no"
759
+ ],
760
+ "default": "yes"
761
}
762
},
763
{
1164
- "name": "label",
764
+ "name": "oldunits",
765
"in": "query",
1166
- "description": "A text to be used as the label.",
766
+ "description": "When enabled, netdata will show metric names for the default `source=average` as they appeared before 1.12, by using the legacy unit naming conventions.\n",
767
"required": false,
1168
- "allowEmptyValue": true,
768
"schema": {
769
"type": "string",
1171
- "format": "any text"
770
+ "enum": [
771
+ "yes",
772
+ "no"
773
+ ],
774
+ "default": "yes"
775
}
776
},
777
{
1175
- "name": "units",
778
+ "name": "hideunits",
779
"in": "query",
1177
- "description": "A text to be used as the units.",
780
+ "description": "When enabled, netdata will not include the units in the metric names, for the default `source=average`.\n",
781
"required": false,
1179
- "allowEmptyValue": true,
782
"schema": {
783
"type": "string",
1182
- "format": "any text"
784
+ "enum": [
785
+ "yes",
786
+ "no"
787
+ ],
788
+ "default": "yes"
789
}
790
},
791
{
1186
- "name": "label_color",
792
+ "name": "server",
793
"in": "query",
1188
- "description": "A color to be used for the background of the label side(left side) of the badge. One of predefined colors or specific color in hex `RGB` or `RRGGBB` format (without preceding `#` character). If value wrong or not given default color will be used.",
794
+ "description": "Set a distinct name of the client querying prometheus metrics. Netdata will use the client IP if this is not set.\n",
795
"required": false,
1190
- "allowEmptyValue": true,
796
"schema": {
1192
- "oneOf": [
1193
- {
1194
- "type": "string",
1195
- "enum": [
1196
- "green",
1197
- "brightgreen",
1198
- "yellow",
1199
- "yellowgreen",
1200
- "orange",
1201
- "red",
1202
- "blue",
1203
- "grey",
1204
- "gray",
1205
- "lightgrey",
1206
- "lightgray"
1207
- ]
1208
- },
1209
- {
1210
- "type": "string",
1211
- "format": "^([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
1212
- }
1213
- ]
797
+ "type": "string",
798
+ "format": "any text"
799
}
800
},
801
{
1217
- "name": "value_color",
802
+ "name": "prefix",
803
"in": "query",
1219
- "description": "A color to be used for the background of the value *(right)* part of badge. You can set multiple using a pipe with a condition each, like this: `color<value|color:null` The following operators are supported: >, <, >=, <=, =, :null (to check if no value exists). Each color can be specified in same manner as for `label_color` parameter. Currently only integers are supported as values.",
804
+ "description": "Prefix all prometheus metrics with this string.\n",
805
"required": false,
1221
- "allowEmptyValue": true,
806
"schema": {
807
"type": "string",
808
"format": "any text"
809
}
810
},
811
{
1228
- "name": "text_color_lbl",
812
+ "name": "data",
813
"in": "query",
1230
- "description": "Font color for label *(left)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.",
814
+ "description": "Select the prometheus response data source. There is a setting in netdata.conf for the default.\n",
815
"required": false,
1232
- "allowEmptyValue": true,
816
"schema": {
1234
- "oneOf": [
1235
- {
1236
- "type": "string",
1237
- "enum": [
1238
- "green",
1239
- "brightgreen",
1240
- "yellow",
1241
- "yellowgreen",
1242
- "orange",
1243
- "red",
1244
- "blue",
1245
- "grey",
1246
- "gray",
1247
- "lightgrey",
1248
- "lightgray"
1249
- ]
1250
- },
1251
- {
1252
- "type": "string",
1253
- "format": "^([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
817
+ "type": "string",
818
+ "enum": [
819
+ "as-collected",
820
+ "average",
821
+ "sum"
822
+ ],
823
+ "default": "average"
824
+ }
825
+ }
826
+ ],
827
+ "responses": {
828
+ "200": {
829
+ "description": "All the metrics returned in the format requested."
830
+ },
831
+ "400": {
832
+ "description": "The format requested is not supported."
833
+ }
834
+ }
835
+ }
836
+ },
837
+ "/api/v1/badge.svg": {
838
+ "get": {
839
+ "operationId": "badge1",
840
+ "tags": [
841
+ "badges"
842
+ ],
843
+ "summary": "Generate a badge in form of SVG image for a chart (or dimension)",
844
+ "description": "Successful responses are SVG images.",
845
+ "parameters": [
846
+ {
847
+ "$ref": "#/components/parameters/chart"
848
+ },
849
+ {
850
+ "$ref": "#/components/parameters/dimension"
851
+ },
852
+ {
853
+ "$ref": "#/components/parameters/after"
854
+ },
855
+ {
856
+ "$ref": "#/components/parameters/before"
857
+ },
858
+ {
859
+ "$ref": "#/components/parameters/dataTimeGroup1"
860
+ },
861
+ {
862
+ "$ref": "#/components/parameters/dataQueryOptions"
863
+ },
864
+ {
865
+ "name": "alarm",
866
+ "in": "query",
867
+ "description": "The name of an alarm linked to the chart.",
868
+ "required": false,
869
+ "allowEmptyValue": true,
870
+ "schema": {
871
+ "type": "string",
872
+ "format": "any text"
873
+ }
874
+ },
875
+ {
876
+ "name": "label",
877
+ "in": "query",
878
+ "description": "A text to be used as the label.",
879
+ "required": false,
880
+ "allowEmptyValue": true,
881
+ "schema": {
882
+ "type": "string",
883
+ "format": "any text"
884
+ }
885
+ },
886
+ {
887
+ "name": "units",
888
+ "in": "query",
889
+ "description": "A text to be used as the units.",
890
+ "required": false,
891
+ "allowEmptyValue": true,
892
+ "schema": {
893
+ "type": "string",
894
+ "format": "any text"
895
+ }
896
+ },
897
+ {
898
+ "name": "label_color",
899
+ "in": "query",
900
+ "description": "A color to be used for the background of the label side(left side) of the badge. One of predefined colors or specific color in hex `RGB` or `RRGGBB` format (without preceding `#` character). If value wrong or not given default color will be used.\n",
901
+ "required": false,
902
+ "allowEmptyValue": true,
903
+ "schema": {
904
+ "oneOf": [
905
+ {
906
+ "type": "string",
907
+ "enum": [
908
+ "green",
909
+ "brightgreen",
910
+ "yellow",
911
+ "yellowgreen",
912
+ "orange",
913
+ "red",
914
+ "blue",
915
+ "grey",
916
+ "gray",
917
+ "lightgrey",
918
+ "lightgray"
919
+ ]
920
+ },
921
+ {
922
+ "type": "string",
923
+ "format": "^([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
924
+ }
925
+ ]
926
+ }
927
+ },
928
+ {
929
+ "name": "value_color",
930
+ "in": "query",
931
+ "description": "A color to be used for the background of the value *(right)* part of badge. You can set multiple using a pipe with a condition each, like this: `color<value|color:null` The following operators are supported: >, <, >=, <=, =, :null (to check if no value exists). Each color can be specified in same manner as for `label_color` parameter. Currently only integers are supported as values.\n",
932
+ "required": false,
933
+ "allowEmptyValue": true,
934
+ "schema": {
935
+ "type": "string",
936
+ "format": "any text"
937
+ }
938
+ },
939
+ {
940
+ "name": "text_color_lbl",
941
+ "in": "query",
942
+ "description": "Font color for label *(left)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.\n",
943
+ "required": false,
944
+ "allowEmptyValue": true,
945
+ "schema": {
946
+ "oneOf": [
947
+ {
948
+ "type": "string",
949
+ "enum": [
950
+ "green",
951
+ "brightgreen",
952
+ "yellow",
953
+ "yellowgreen",
954
+ "orange",
955
+ "red",
956
+ "blue",
957
+ "grey",
958
+ "gray",
959
+ "lightgrey",
960
+ "lightgray"
961
+ ]
962
+ },
963
+ {
964
+ "type": "string",
965
+ "format": "^([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
966
}
967
]
968
}
970
{
971
"name": "text_color_val",
972
"in": "query",
1261
- "description": "Font color for value *(right)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.",
973
+ "description": "Font color for value *(right)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.\n",
974
"required": false,
975
"allowEmptyValue": true,
976
"schema": {
1034
{
1035
"name": "fixed_width_lbl",
1036
"in": "query",
1325
- "description": "This parameter overrides auto-sizing of badge and creates it with fixed width. This parameter determines the size of the label's left side *(label/name)*. You must set this parameter together with `fixed_width_val` otherwise it will be ignored. You should set the label/value widths wide enough to provide space for all the possible values/contents of the badge you're requesting. In case the text cannot fit the space given it will be clipped. The `scale` parameter still applies on the values you give to `fixed_width_lbl` and `fixed_width_val`.",
1037
+ "description": "This parameter overrides auto-sizing of badge and creates it with fixed width. This parameter determines the size of the label's left side *(label/name)*. You must set this parameter together with `fixed_width_val` otherwise it will be ignored. You should set the label/value widths wide enough to provide space for all the possible values/contents of the badge you're requesting. In case the text cannot fit the space given it will be clipped. The `scale` parameter still applies on the values you give to `fixed_width_lbl` and `fixed_width_val`.\n",
1038
"required": false,
1039
"allowEmptyValue": false,
1040
"schema": {
1045
{
1046
"name": "fixed_width_val",
1047
"in": "query",
1336
- "description": "This parameter overrides auto-sizing of badge and creates it with fixed width. This parameter determines the size of the label's right side *(value)*. You must set this parameter together with `fixed_width_lbl` otherwise it will be ignored. You should set the label/value widths wide enough to provide space for all the possible values/contents of the badge you're requesting. In case the text cannot fit the space given it will be clipped. The `scale` parameter still applies on the values you give to `fixed_width_lbl` and `fixed_width_val`.",
1048
+ "description": "This parameter overrides auto-sizing of badge and creates it with fixed width. This parameter determines the size of the label's right side *(value)*. You must set this parameter together with `fixed_width_lbl` otherwise it will be ignored. You should set the label/value widths wide enough to provide space for all the possible values/contents of the badge you're requesting. In case the text cannot fit the space given it will be clipped. The `scale` parameter still applies on the values you give to `fixed_width_lbl` and `fixed_width_val`.\n",
1049
"required": false,
1050
"allowEmptyValue": false,
1051
"schema": {
1070
}
1071
}
1072
},
1361
- "/api/v1/allmetrics": {
1073
+ "/api/v2/weights": {
1074
"get": {
1363
- "summary": "Get a value of all the metrics maintained by netdata",
1364
- "description": "The allmetrics endpoint returns the latest value of all charts and dimensions stored in the netdata server.",
1075
+ "operationId": "weights2",
1076
+ "tags": [
1077
+ "weights"
1078
+ ],
1079
+ "summary": "Score or weight all or some of the metrics, across all nodes, according to various algorithms.",
1080
+ "description": "This endpoint goes through all metrics and scores them according to an algorithm.\n",
1081
"parameters": [
1082
{
1367
- "name": "format",
1368
- "in": "query",
1369
- "description": "The format of the response to be returned.",
1370
- "required": true,
1371
- "schema": {
1372
- "type": "string",
1373
- "enum": [
1374
- "shell",
1375
- "prometheus",
1376
- "prometheus_all_hosts",
1377
- "json"
1378
- ],
1379
- "default": "shell"
1380
- }
1083
+ "$ref": "#/components/parameters/weightMethods"
1084
},
1085
{
1383
- "name": "filter",
1384
- "in": "query",
1385
- "description": "Allows to filter charts out using simple patterns.",
1386
- "required": false,
1387
- "schema": {
1388
- "type": "string",
1389
- "format": "any text"
1390
- }
1086
+ "$ref": "#/components/parameters/scopeNodes"
1087
},
1088
{
1393
- "name": "variables",
1394
- "in": "query",
1395
- "description": "When enabled, netdata will expose various system configuration metrics.",
1396
- "required": false,
1397
- "schema": {
1398
- "type": "string",
1399
- "enum": [
1400
- "yes",
1401
- "no"
1402
- ],
1403
- "default": "no"
1404
- }
1089
+ "$ref": "#/components/parameters/scopeContexts"
1090
},
1091
{
1407
- "name": "help",
1408
- "in": "query",
1409
- "description": "Enable or disable HELP lines in prometheus output.",
1410
- "required": false,
1411
- "schema": {
1412
- "type": "string",
1413
- "enum": [
1414
- "yes",
1415
- "no"
1416
- ],
1417
- "default": "no"
1418
- }
1092
+ "$ref": "#/components/parameters/filterNodes"
1093
},
1094
{
1421
- "name": "types",
1422
- "in": "query",
1423
- "description": "Enable or disable TYPE lines in prometheus output.",
1424
- "required": false,
1425
- "schema": {
1426
- "type": "string",
1427
- "enum": [
1428
- "yes",
1429
- "no"
1430
- ],
1431
- "default": "no"
1432
- }
1095
+ "$ref": "#/components/parameters/filterContexts"
1096
},
1097
{
1435
- "name": "timestamps",
1436
- "in": "query",
1437
- "description": "Enable or disable timestamps in prometheus output.",
1438
- "required": false,
1439
- "schema": {
1440
- "type": "string",
1441
- "enum": [
1442
- "yes",
1443
- "no"
1444
- ],
1445
- "default": "yes"
1446
- }
1098
+ "$ref": "#/components/parameters/filterInstances"
1099
},
1100
{
1449
- "name": "names",
1450
- "in": "query",
1451
- "description": "When enabled netdata will report dimension names. When disabled netdata will report dimension IDs. The default is controlled in netdata.conf.",
1452
- "required": false,
1453
- "schema": {
1454
- "type": "string",
1455
- "enum": [
1456
- "yes",
1457
- "no"
1458
- ],
1459
- "default": "yes"
1460
- }
1101
+ "$ref": "#/components/parameters/filterLabels"
1102
},
1103
{
1463
- "name": "oldunits",
1464
- "in": "query",
1465
- "description": "When enabled, netdata will show metric names for the default source=average as they appeared before 1.12, by using the legacy unit naming conventions.",
1466
- "required": false,
1467
- "schema": {
1468
- "type": "string",
1469
- "enum": [
1470
- "yes",
1471
- "no"
1472
- ],
1473
- "default": "yes"
1474
- }
1104
+ "$ref": "#/components/parameters/filterAlerts"
1105
},
1106
{
1477
- "name": "hideunits",
1478
- "in": "query",
1479
- "description": "When enabled, netdata will not include the units in the metric names, for the default source=average.",
1480
- "required": false,
1481
- "schema": {
1482
- "type": "string",
1483
- "enum": [
1484
- "yes",
1485
- "no"
1486
- ],
1487
- "default": "yes"
1488
- }
1107
+ "$ref": "#/components/parameters/filterDimensions"
1108
},
1109
{
1491
- "name": "server",
1492
- "in": "query",
1493
- "description": "Set a distinct name of the client querying prometheus metrics. Netdata will use the client IP if this is not set.",
1494
- "required": false,
1495
- "schema": {
1496
- "type": "string",
1497
- "format": "any text"
1498
- }
1110
+ "$ref": "#/components/parameters/baselineAfter"
1111
},
1112
{
1501
- "name": "prefix",
1502
- "in": "query",
1503
- "description": "Prefix all prometheus metrics with this string.",
1504
- "required": false,
1505
- "schema": {
1506
- "type": "string",
1507
- "format": "any text"
1508
- }
1113
+ "$ref": "#/components/parameters/baselineBefore"
1114
},
1115
{
1511
- "name": "data",
1512
- "in": "query",
1513
- "description": "Select the prometheus response data source. There is a setting in netdata.conf for the default.",
1514
- "required": false,
1515
- "schema": {
1516
- "type": "string",
1517
- "enum": [
1518
- "as-collected",
1519
- "average",
1520
- "sum"
1521
- ],
1522
- "default": "average"
1116
+ "$ref": "#/components/parameters/after"
1117
+ },
1118
+ {
1119
+ "$ref": "#/components/parameters/before"
1120
+ },
1121
+ {
1122
+ "$ref": "#/components/parameters/tier"
1123
+ },
1124
+ {
1125
+ "$ref": "#/components/parameters/points"
1126
+ },
1127
+ {
1128
+ "$ref": "#/components/parameters/timeoutMS"
1129
+ },
1130
+ {
1131
+ "$ref": "#/components/parameters/dataQueryOptions"
1132
+ },
1133
+ {
1134
+ "$ref": "#/components/parameters/dataTimeGroup2"
1135
+ },
1136
+ {
1137
+ "$ref": "#/components/parameters/dataTimeGroupOptions2"
1138
+ }
1139
+ ],
1140
+ "responses": {
1141
+ "200": {
1142
+ "description": "JSON object with weights for each context, chart and dimension.",
1143
+ "content": {
1144
+ "application/json": {
1145
+ "schema": {
1146
+ "$ref": "#/components/schemas/weights2"
1147
+ }
1148
+ }
1149
}
1150
+ },
1151
+ "400": {
1152
+ "description": "The given parameters are invalid."
1153
+ },
1154
+ "403": {
1155
+ "description": "metrics correlations are not enabled on this Netdata Agent."
1156
+ },
1157
+ "404": {
1158
+ "description": "No charts could be found, or the method that correlated the metrics did not produce any result.\n"
1159
+ },
1160
+ "504": {
1161
+ "description": "Timeout - the query took too long and has been cancelled."
1162
+ }
1163
+ }
1164
+ }
1165
+ },
1166
+ "/api/v1/weights": {
1167
+ "get": {
1168
+ "operationId": "weights1",
1169
+ "tags": [
1170
+ "weights"
1171
+ ],
1172
+ "summary": "Score or weight all or some of the metrics of a single node, according to various algorithms.",
1173
+ "description": "This endpoint goes through all metrics and scores them according to an algorithm.\n",
1174
+ "parameters": [
1175
+ {
1176
+ "$ref": "#/components/parameters/weightMethods"
1177
+ },
1178
+ {
1179
+ "$ref": "#/components/parameters/context"
1180
+ },
1181
+ {
1182
+ "$ref": "#/components/parameters/baselineAfter"
1183
+ },
1184
+ {
1185
+ "$ref": "#/components/parameters/baselineBefore"
1186
+ },
1187
+ {
1188
+ "$ref": "#/components/parameters/after"
1189
+ },
1190
+ {
1191
+ "$ref": "#/components/parameters/before"
1192
+ },
1193
+ {
1194
+ "$ref": "#/components/parameters/tier"
1195
+ },
1196
+ {
1197
+ "$ref": "#/components/parameters/points"
1198
+ },
1199
+ {
1200
+ "$ref": "#/components/parameters/timeoutMS"
1201
+ },
1202
+ {
1203
+ "$ref": "#/components/parameters/dataQueryOptions"
1204
+ },
1205
+ {
1206
+ "$ref": "#/components/parameters/dataTimeGroup1"
1207
+ },
1208
+ {
1209
+ "$ref": "#/components/parameters/dataTimeGroupOptions1"
1210
}
1211
],
1212
"responses": {
1213
"200": {
1528
- "description": "All the metrics returned in the format requested."
1214
+ "description": "JSON object with weights for each context, chart and dimension.",
1215
+ "content": {
1216
+ "application/json": {
1217
+ "schema": {
1218
+ "$ref": "#/components/schemas/weights"
1219
+ }
1220
+ }
1221
+ }
1222
},
1223
"400": {
1531
- "description": "The format requested is not supported."
1224
+ "description": "The given parameters are invalid."
1225
+ },
1226
+ "403": {
1227
+ "description": "metrics correlations are not enabled on this Netdata Agent."
1228
+ },
1229
+ "404": {
1230
+ "description": "No charts could be found, or the method that correlated the metrics did not produce any result."
1231
+ },
1232
+ "504": {
1233
+ "description": "Timeout - the query took too long and has been cancelled."
1234
+ }
1235
+ }
1236
+ }
1237
+ },
1238
+ "/api/v1/metric_correlations": {
1239
+ "get": {
1240
+ "operationId": "metricCorrelations1",
1241
+ "tags": [
1242
+ "weights"
1243
+ ],
1244
+ "summary": "Analyze all the metrics to find their correlations - EOL",
1245
+ "description": "THIS ENDPOINT IS OBSOLETE. Use the /weights endpoint. Given two time-windows (baseline, highlight), it goes through all the available metrics, querying both windows and tries to find how these two windows relate to each other. It supports multiple algorithms to do so. The result is a list of all metrics evaluated, weighted for 0.0 (the two windows are more different) to 1.0 (the two windows are similar). The algorithm adjusts automatically the baseline window to be a power of two multiple of the highlighted (1, 2, 4, 8, etc).\n",
1246
+ "parameters": [
1247
+ {
1248
+ "$ref": "#/components/parameters/weightMethods"
1249
+ },
1250
+ {
1251
+ "$ref": "#/components/parameters/baselineAfter"
1252
+ },
1253
+ {
1254
+ "$ref": "#/components/parameters/baselineBefore"
1255
+ },
1256
+ {
1257
+ "$ref": "#/components/parameters/after"
1258
+ },
1259
+ {
1260
+ "$ref": "#/components/parameters/before"
1261
+ },
1262
+ {
1263
+ "$ref": "#/components/parameters/points"
1264
+ },
1265
+ {
1266
+ "$ref": "#/components/parameters/tier"
1267
+ },
1268
+ {
1269
+ "$ref": "#/components/parameters/timeoutMS"
1270
+ },
1271
+ {
1272
+ "$ref": "#/components/parameters/dataQueryOptions"
1273
+ },
1274
+ {
1275
+ "$ref": "#/components/parameters/dataTimeGroup1"
1276
+ },
1277
+ {
1278
+ "$ref": "#/components/parameters/dataTimeGroupOptions1"
1279
+ }
1280
+ ],
1281
+ "responses": {
1282
+ "200": {
1283
+ "description": "JSON object with weights for each chart and dimension.",
1284
+ "content": {
1285
+ "application/json": {
1286
+ "schema": {
1287
+ "$ref": "#/components/schemas/metric_correlations"
1288
+ }
1289
+ }
1290
+ }
1291
+ },
1292
+ "400": {
1293
+ "description": "The given parameters are invalid."
1294
+ },
1295
+ "403": {
1296
+ "description": "metrics correlations are not enabled on this Netdata Agent."
1297
+ },
1298
+ "404": {
1299
+ "description": "No charts could be found, or the method that correlated the metrics did not produce any result."
1300
+ },
1301
+ "504": {
1302
+ "description": "Timeout - the query took too long and has been cancelled."
1303
+ }
1304
+ }
1305
+ }
1306
+ },
1307
+ "/api/v1/function": {
1308
+ "get": {
1309
+ "operationId": "function1",
1310
+ "tags": [
1311
+ "functions"
1312
+ ],
1313
+ "description": "Execute a collector function.",
1314
+ "parameters": [
1315
+ {
1316
+ "name": "function",
1317
+ "in": "query",
1318
+ "description": "The name of the function, as returned by the collector.",
1319
+ "required": true,
1320
+ "allowEmptyValue": false,
1321
+ "schema": {
1322
+ "type": "string"
1323
+ }
1324
+ },
1325
+ {
1326
+ "$ref": "#/components/parameters/timeoutSecs"
1327
+ }
1328
+ ],
1329
+ "responses": {
1330
+ "200": {
1331
+ "description": "The collector function has been executed successfully. Each collector may return a different type of content."
1332
+ },
1333
+ "400": {
1334
+ "description": "The request was rejected by the collector."
1335
+ },
1336
+ "404": {
1337
+ "description": "The requested function is not found."
1338
+ },
1339
+ "500": {
1340
+ "description": "Other internal error, getting this error means there is a bug in Netdata."
1341
+ },
1342
+ "503": {
1343
+ "description": "The collector to execute the function is not currently available."
1344
+ },
1345
+ "504": {
1346
+ "description": "Timeout while waiting for the collector to execute the function."
1347
+ },
1348
+ "591": {
1349
+ "description": "The collector sent a response, but it was invalid or corrupted."
1350
+ }
1351
+ }
1352
+ }
1353
+ },
1354
+ "/api/v1/functions": {
1355
+ "get": {
1356
+ "operationId": "functions1",
1357
+ "tags": [
1358
+ "functions"
1359
+ ],
1360
+ "summary": "Get a list of all registered collector functions.",
1361
+ "description": "Collector functions are programs that can be executed on demand.",
1362
+ "responses": {
1363
+ "200": {
1364
+ "description": "A JSON object containing one object per supported function."
1365
}
1366
}
1367
}
1368
},
1369
"/api/v1/alarms": {
1370
"get": {
1371
+ "operationId": "alerts1",
1372
+ "tags": [
1373
+ "alerts"
1374
+ ],
1375
"summary": "Get a list of active or raised alarms on the server",
1539
- "description": "The alarms endpoint returns the list of all raised or enabled alarms on the netdata server. Called without any parameters, the raised alarms in state WARNING or CRITICAL are returned. By passing \"?all\", all the enabled alarms are returned.",
1376
+ "description": "The alarms endpoint returns the list of all raised or enabled alarms on the netdata server. Called without any parameters, the raised alarms in state WARNING or CRITICAL are returned. By passing \"?all\", all the enabled alarms are returned.\n",
1377
"parameters": [
1378
{
1379
"name": "all",
1412
},
1413
"/api/v1/alarms_values": {
1414
"get": {
1415
+ "operationId": "alertValues1",
1416
+ "tags": [
1417
+ "alerts"
1418
+ ],
1419
"summary": "Get a list of active or raised alarms on the server",
1579
- "description": "The alarms_values endpoint returns the list of all raised or enabled alarms on the netdata server. Called without any parameters, the raised alarms in state WARNING or CRITICAL are returned. By passing '?all', all the enabled alarms are returned. This option output differs from `/alarms` in the number of variables delivered. This endpoint gives to user `id`, `value`, `last_updated` time, and alarm `status`.",
1420
+ "description": "The alarms_values endpoint returns the list of all raised or enabled alarms on the netdata server. Called without any parameters, the raised alarms in state WARNING or CRITICAL are returned. By passing '?all', all the enabled alarms are returned. This option output differs from `/alarms` in the number of variables delivered. This endpoint gives to user `id`, `value`, `last_updated` time, and alarm `status`.\n",
1421
"parameters": [
1422
{
1423
"name": "all",
1456
},
1457
"/api/v1/alarm_log": {
1458
"get": {
1459
+ "operationId": "alertsLog1",
1460
+ "tags": [
1461
+ "alerts"
1462
+ ],
1463
"summary": "Retrieves the entries of the alarm log",
1619
- "description": "Returns an array of alarm_log entries, with historical information on raised and cleared alarms.",
1464
+ "description": "Returns an array of alarm_log entries, with historical information on raised and cleared alarms.\n",
1465
"parameters": [
1466
{
1467
"name": "after",
1468
"in": "query",
1624
- "description": "Passing the parameter after=UNIQUEID returns all the events in the alarm log that occurred after UNIQUEID. An automated series of calls would call the interface once without after=, store the last UNIQUEID of the returned set, and give it back to get incrementally the next events.",
1469
+ "description": "Passing the parameter after=UNIQUEID returns all the events in the alarm log that occurred after UNIQUEID. An automated series of calls would call the interface once without after=, store the last UNIQUEID of the returned set, and give it back to get incrementally the next events.\n",
1470
"required": false,
1471
"schema": {
1472
"type": "integer"
1492
},
1493
"/api/v1/alarm_count": {
1494
"get": {
1495
+ "operationId": "alertsCount1",
1496
+ "tags": [
1497
+ "alerts"
1498
+ ],
1499
"summary": "Get an overall status of the chart",
1651
- "description": "Checks multiple charts with the same context and counts number of alarms with given status.",
1500
+ "description": "Checks multiple charts with the same context and counts number of alarms with given status.\n",
1501
"parameters": [
1502
{
1654
- "in": "query",
1655
- "name": "context",
1656
- "description": "Specify context which should be checked.",
1657
- "required": false,
1658
- "allowEmptyValue": true,
1659
- "schema": {
1660
- "type": "array",
1661
- "items": {
1662
- "type": "string"
1663
- },
1664
- "default": [
1665
- "system.cpu"
1666
- ]
1667
- }
1503
+ "$ref": "#/components/parameters/context"
1504
},
1505
{
1670
- "in": "query",
1506
"name": "status",
1507
+ "in": "query",
1508
"description": "Specify alarm status to count.",
1509
"required": false,
1510
"allowEmptyValue": true,
1543
}
1544
}
1545
},
1710
- "/api/v1/manage/health": {
1546
+ "/api/v1/alarm_variables": {
1547
"get": {
1712
- "summary": "Accesses the health management API to control health checks and notifications at runtime.",
1713
- "description": "Available from Netdata v1.12 and above, protected via bearer authorization. Especially useful for maintenance periods, the API allows you to disable health checks completely, silence alarm notifications, or Disable/Silence specific alarms that match selectors on alarm/template name, chart, context, host and family. For the simple disable/silence all scenarios, only the cmd parameter is required. The other parameters are used to define alarm selectors. For more information and examples, refer to the netdata documentation.",
1548
+ "operationId": "getNodeAlertVariables1",
1549
+ "tags": [
1550
+ "alerts"
1551
+ ],
1552
+ "summary": "List variables available to configure alarms for a chart",
1553
+ "description": "Returns the basic information of a chart and all the variables that can be used in alarm and template health configurations for the particular chart or family.\n",
1554
"parameters": [
1555
{
1716
- "name": "cmd",
1556
+ "name": "chart",
1557
"in": "query",
1718
- "description": "DISABLE ALL: No alarm criteria are evaluated, nothing is written in the alarm log. SILENCE ALL: No notifications are sent. RESET: Return to the default state. DISABLE/SILENCE: Set the mode to be used for the alarms matching the criteria of the alarm selectors. LIST: Show active configuration.",
1719
- "required": false,
1558
+ "description": "The id of the chart as returned by the /charts call.",
1559
+ "required": true,
1560
"schema": {
1561
"type": "string",
1722
- "enum": [
1723
- "DISABLE ALL",
1724
- "SILENCE ALL",
1725
- "DISABLE",
1726
- "SILENCE",
1727
- "RESET",
1728
- "LIST"
1729
- ]
1562
+ "format": "as returned by /charts",
1563
+ "default": "system.cpu"
1564
}
1731
- },
1732
- {
1733
- "name": "alarm",
1734
- "in": "query",
1735
- "description": "The expression provided will match both `alarm` and `template` names.",
1736
- "schema": {
1737
- "type": "string"
1565
+ }
1566
+ ],
1567
+ "responses": {
1568
+ "200": {
1569
+ "description": "A javascript object with information about the chart and the available variables.",
1570
+ "content": {
1571
+ "application/json": {
1572
+ "schema": {
1573
+ "$ref": "#/components/schemas/alarm_variables"
1574
+ }
1575
+ }
1576
}
1577
},
1740
- {
1578
+ "400": {
1579
+ "description": "Bad request - the body will include a message stating what is wrong."
1580
+ },
1581
+ "404": {
1582
+ "description": "No chart with the given id is found."
1583
+ },
1584
+ "500": {
1585
+ "description": "Internal server error. This usually means the server is out of memory."
1586
+ }
1587
+ }
1588
+ }
1589
+ },
1590
+ "/api/v1/manage/health": {
1591
+ "get": {
1592
+ "operationId": "health1",
1593
+ "tags": [
1594
+ "management"
1595
+ ],
1596
+ "summary": "Accesses the health management API to control health checks and notifications at runtime.\n",
1597
+ "description": "Available from Netdata v1.12 and above, protected via bearer authorization. Especially useful for maintenance periods, the API allows you to disable health checks completely, silence alarm notifications, or Disable/Silence specific alarms that match selectors on alarm/template name, chart, context, host and family. For the simple disable/silence all scenarios, only the cmd parameter is required. The other parameters are used to define alarm selectors. For more information and examples, refer to the netdata documentation.\n",
1598
+ "parameters": [
1599
+ {
1600
+ "name": "cmd",
1601
+ "in": "query",
1602
+ "description": "DISABLE ALL: No alarm criteria are evaluated, nothing is written in the alarm log. SILENCE ALL: No notifications are sent. RESET: Return to the default state. DISABLE/SILENCE: Set the mode to be used for the alarms matching the criteria of the alarm selectors. LIST: Show active configuration.\n",
1603
+ "required": false,
1604
+ "schema": {
1605
+ "type": "string",
1606
+ "enum": [
1607
+ "DISABLE ALL",
1608
+ "SILENCE ALL",
1609
+ "DISABLE",
1610
+ "SILENCE",
1611
+ "RESET",
1612
+ "LIST"
1613
+ ]
1614
+ }
1615
+ },
1616
+ {
1617
+ "name": "alarm",
1618
+ "in": "query",
1619
+ "description": "The expression provided will match both `alarm` and `template` names.",
1620
+ "schema": {
1621
+ "type": "string"
1622
+ }
1623
+ },
1624
+ {
1625
"name": "chart",
1626
"in": "query",
1627
"description": "Chart ids/names, as shown on the dashboard. These will match the `on` entry of a configured `alarm`.",
1666
},
1667
"/api/v1/aclk": {
1668
"get": {
1669
+ "operationId": "aclk1",
1670
+ "tags": [
1671
+ "management"
1672
+ ],
1673
"summary": "Get information about current ACLK state",
1786
- "description": "ACLK endpoint returns detailed information about current state of ACLK (Agent to Cloud communication).",
1674
+ "description": "ACLK endpoint returns detailed information about current state of ACLK (Agent to Cloud communication).\n",
1675
"responses": {
1676
"200": {
1677
"description": "JSON object with ACLK information.",
1685
}
1686
}
1687
}
1800
- },
1801
- "/api/v1/metric_correlations": {
1802
- "get": {
1803
- "summary": "Analyze all the metrics to find their correlations",
1804
- "description": "THIS ENDPOINT IS OBSOLETE. Use the /weights endpoint. Given two time-windows (baseline, highlight), it goes through all the available metrics, querying both windows and tries to find how these two windows relate to each other. It supports multiple algorithms to do so. The result is a list of all metrics evaluated, weighted for 0.0 (the two windows are more different) to 1.0 (the two windows are similar). The algorithm adjusts automatically the baseline window to be a power of two multiple of the highlighted (1, 2, 4, 8, etc).",
1805
- "parameters": [
1806
- {
1807
- "name": "baseline_after",
1808
- "in": "query",
1809
- "description": "This parameter can either be an absolute timestamp specifying the starting point of baseline window, or a relative number of seconds (negative, relative to parameter baseline_before). Netdata will assume it is a relative number if it is less that 3 years (in seconds).",
1810
- "required": false,
1811
- "allowEmptyValue": false,
1812
- "schema": {
1813
- "type": "number",
1814
- "format": "integer",
1815
- "default": -300
1816
- }
1688
+ }
1689
+ },
1690
+ "components": {
1691
+ "parameters": {
1692
+ "scopeNodes": {
1693
+ "name": "scope_nodes",
1694
+ "in": "query",
1695
+ "description": "A simple pattern limiting the nodes scope of the query. The scope controls both data and metadata response. The simple pattern is checked against the nodes' machine guid, node id and hostname. The default nodes scope is all nodes for which this agent has data for. Usually the nodes scope is used to slice the entire dashboard (e.g. the Global Nodes Selector at the Netdata Cloud overview dashboard). Both positive and negative simple pattern expressions are supported.\n",
1696
+ "required": false,
1697
+ "schema": {
1698
+ "type": "string",
1699
+ "format": "simple pattern",
1700
+ "default": "*"
1701
+ }
1702
+ },
1703
+ "scopeContexts": {
1704
+ "name": "scope_contexts",
1705
+ "in": "query",
1706
+ "description": "A simple pattern limiting the contexts scope of the query. The scope controls both data and metadata response. The default contexts scope is all contexts for which this agent has data for. Usually the contexts scope is used to slice data on the dashboard (e.g. each context based chart has its own contexts scope, limiting the chart to all the instances of the selected context). Both positive and negative simple pattern expressions are supported.\n",
1707
+ "required": false,
1708
+ "schema": {
1709
+ "type": "string",
1710
+ "format": "simple pattern",
1711
+ "default": "*"
1712
+ }
1713
+ },
1714
+ "filterNodes": {
1715
+ "name": "nodes",
1716
+ "in": "query",
1717
+ "description": "A simple pattern matching the nodes to be queried. This only controls the data response, not the metadata. The simple pattern is checked against the nodes' machine guid, node id, hostname. The default nodes selector is all the nodes matched by the nodes scope. Both positive and negative simple pattern expressions are supported.\n",
1718
+ "required": false,
1719
+ "schema": {
1720
+ "type": "string",
1721
+ "format": "simple pattern",
1722
+ "default": "*"
1723
+ }
1724
+ },
1725
+ "filterContexts": {
1726
+ "name": "contexts",
1727
+ "in": "query",
1728
+ "description": "A simple pattern matching the contexts to be queried. This only controls the data response, not the metadata. Both positive and negative simple pattern expressions are supported.\n",
1729
+ "required": false,
1730
+ "schema": {
1731
+ "type": "string",
1732
+ "format": "simple pattern",
1733
+ "default": "*"
1734
+ }
1735
+ },
1736
+ "filterInstances": {
1737
+ "name": "instances",
1738
+ "in": "query",
1739
+ "description": "A simple pattern matching the instances to be queried. The simple pattern is checked against the instance `id`, the instance `name`, the fully qualified name of the instance `id` and `name`, like `instance@machine_guid`, where `instance` is either its `id` or `name`. Both positive and negative simple pattern expressions are supported.\n",
1740
+ "required": false,
1741
+ "schema": {
1742
+ "type": "string",
1743
+ "format": "simple pattern",
1744
+ "default": "*"
1745
+ }
1746
+ },
1747
+ "filterLabels": {
1748
+ "name": "labels",
1749
+ "in": "query",
1750
+ "description": "A simple pattern matching the labels to be queried. The simple pattern is checked against `name:value` of all the labels of all the eligible instances (as filtered by all the above: scope nodes, scope contexts, nodes, contexts and instances). Negative simple patterns should not be used in this filter.\n",
1751
+ "required": false,
1752
+ "schema": {
1753
+ "type": "string",
1754
+ "format": "simple pattern",
1755
+ "default": "*"
1756
+ }
1757
+ },
1758
+ "filterAlerts": {
1759
+ "name": "alerts",
1760
+ "in": "query",
1761
+ "description": "A simple pattern matching the alerts to be queried. The simple pattern is checked against the `name` of alerts and the combination of `name:status`, when status is one of `CLEAR`, `WARNING`, `CRITICAL`, `REMOVED`, `UNDEFINED`, `UNINITIALIZED`, of all the alerts of all the eligible instances (as filtered by all the above). A negative simple pattern will exclude the instances having the labels matched.\n",
1762
+ "required": false,
1763
+ "schema": {
1764
+ "type": "string",
1765
+ "format": "simple pattern",
1766
+ "default": "*"
1767
+ }
1768
+ },
1769
+ "filterDimensions": {
1770
+ "name": "dimensions",
1771
+ "in": "query",
1772
+ "description": "A simple patterns matching the dimensions to be queried. The simple pattern is checked against and `id` and the `name` of the dimensions of the eligible instances (as filtered by all the above). Both positive and negative simple pattern expressions are supported.\n",
1773
+ "required": false,
1774
+ "schema": {
1775
+ "type": "string",
1776
+ "format": "simple pattern",
1777
+ "default": "*"
1778
+ }
1779
+ },
1780
+ "dataFormat1": {
1781
+ "name": "format",
1782
+ "in": "query",
1783
+ "description": "The format of the data to be returned.",
1784
+ "allowEmptyValue": false,
1785
+ "schema": {
1786
+ "type": "string",
1787
+ "enum": [
1788
+ "json",
1789
+ "jsonp",
1790
+ "csv",
1791
+ "tsv",
1792
+ "tsv-excel",
1793
+ "ssv",
1794
+ "ssvcomma",
1795
+ "datatable",
1796
+ "datasource",
1797
+ "html",
1798
+ "markdown",
1799
+ "array",
1800
+ "csvjsonarray"
1801
+ ],
1802
+ "default": "json"
1803
+ }
1804
+ },
1805
+ "dataFormat2": {
1806
+ "name": "format",
1807
+ "in": "query",
1808
+ "description": "The format of the data to be returned.",
1809
+ "allowEmptyValue": false,
1810
+ "schema": {
1811
+ "type": "string",
1812
+ "enum": [
1813
+ "json",
1814
+ "json2",
1815
+ "jsonp",
1816
+ "csv",
1817
+ "tsv",
1818
+ "tsv-excel",
1819
+ "ssv",
1820
+ "ssvcomma",
1821
+ "datatable",
1822
+ "datasource",
1823
+ "html",
1824
+ "markdown",
1825
+ "array",
1826
+ "csvjsonarray"
1827
+ ],
1828
+ "default": "json2"
1829
+ }
1830
+ },
1831
+ "dataQueryOptions": {
1832
+ "name": "options",
1833
+ "in": "query",
1834
+ "description": "Options that affect data generation.\n* `jsonwrap` - Wrap the output in a JSON object with metadata about the query.\n* `raw` - change the output so that it is aggregatable across multiple such queries. Supported by `/api/v2` data queries and `json2` format.\n* `minify` - Remove unnecessary spaces and newlines from the output.\n* `debug` - Provide additional information in `jsonwrap` output to help tracing issues.\n* `nonzero` - Do not return dimensions that all their values are zero, to improve the visual appearance of charts. They will still be returned if all the dimensions are entirely zero.\n* `null2zero` - Replace `null` values with `0`.\n* `absolute` or `abs` - Traditionally Netdata returns select dimensions negative to improve visual appearance. This option turns this feature off.\n* `display-absolute` - Only used by badges, to do color calculation using the signed value, but render the value without a sign.\n* `flip` or `reversed` - Order the timestamps array in reverse order (newest to oldest).\n* `min2max` - When flattening multi-dimensional data into a single metric format, use `max - min` instead of `sum`. This is EOL - use `/api/v2` to control aggregation across dimensions.\n* `percentage` - Convert all values into a percentage vs the row total. When enabled, Netdata will query all dimensions, even the ones that have not been selected or are hidden, to find the row total, in order to calculate the percentage of each dimension selected.\n* `seconds` - Output timestamps in seconds instead of dates.\n* `milliseconds` or `ms` - Output timestamps in milliseconds instead of dates.\n* `unaligned` - by default queries are aligned to the the view, so that as time passes past data returned do not change. When a data query will not be used for visualization, `unaligned` can be given to avoid aligning the query time-frame for visual precision.\n* `match-ids`, `match-names`. By default filters match both IDs and names when they are available. Setting either of the two options will disable the other.\n* `anomaly-bit` - query the anomaly information instead of metric values. This is EOL, use `/api/v2` and `json2` format which always returns this information and many more.\n* `jw-anomaly-rates` - return anomaly rates as a separate result set in the same `json` format response. This is EOL, use `/api/v2` and `json2` format which always returns information and many more. \n* `details` - `/api/v2/data` returns in `jsonwrap` the full tree of dimensions that have been matched by the query.\n* `group-by-labels` - `/api/v2/data` returns in `jsonwrap` flattened labels per output dimension. These are used to identify the instances that have been aggregated into each dimension, making it possible to provide a map, like Netdata does for Kubernetes.\n* `natural-points` - return timestamps as found in the database. The result is again fixed-step, but the query engine attempts to align them with the timestamps found in the database.\n* `virtual-points` - return timestamps independent of the database alignment. This is needed aggregating data across multiple Netdata agents, to ensure that their outputs do not need to be interpolated to be merged.\n* `selected-tier` - use data exclusively from the selected tier given with the `tier` parameter. This option is set automatically when the `tier` parameter is set.\n* `all-dimensions` - In `/api/v1` `jsonwrap` include metadata for all candidate metrics examined. In `/api/v2` this is standard behavior and no option is needed.\n* `label-quotes` - In `csv` output format, enclose each header label in quotes.\n* `objectrows` - Each row of value should be an object, not an array (only for `json` format).\n* `google_json` - Comply with google JSON/JSONP specs (only for `json` format).\n",
1835
+ "required": false,
1836
+ "allowEmptyValue": false,
1837
+ "schema": {
1838
+ "type": "array",
1839
+ "items": {
1840
+ "type": "string",
1841
+ "enum": [
1842
+ "jsonwrap",
1843
+ "raw",
1844
+ "minify",
1845
+ "debug",
1846
+ "nonzero",
1847
+ "null2zero",
1848
+ "abs",
1849
+ "absolute",
1850
+ "display-absolute",
1851
+ "flip",
1852
+ "reversed",
1853
+ "min2max",
1854
+ "percentage",
1855
+ "seconds",
1856
+ "ms",
1857
+ "milliseconds",
1858
+ "unaligned",
1859
+ "match-ids",
1860
+ "match-names",
1861
+ "anomaly-bit",
1862
+ "jw-anomaly-rates",
1863
+ "details",
1864
+ "group-by-labels",
1865
+ "natural-points",
1866
+ "virtual-points",
1867
+ "selected-tier",
1868
+ "all-dimensions",
1869
+ "label-quotes",
1870
+ "objectrows",
1871
+ "google_json"
1872
+ ]
1873
},
1818
- {
1819
- "name": "baseline_before",
1820
- "in": "query",
1821
- "description": "This parameter can either be an absolute timestamp specifying the ending point of the baseline window, or a relative number of seconds (negative), relative to the last collected timestamp. Netdata will assume it is a relative number if it is less than 3 years (in seconds).",
1822
- "required": false,
1823
- "schema": {
1824
- "type": "number",
1825
- "format": "integer",
1826
- "default": -60
1827
- }
1874
+ "default": [
1875
+ "seconds",
1876
+ "jsonwrap"
1877
+ ]
1878
+ }
1879
+ },
1880
+ "dataTimeGroup1": {
1881
+ "name": "group",
1882
+ "in": "query",
1883
+ "description": "Time aggregation function. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. If the `absolute` option is set, the values are turned positive before applying this calculation.\n",
1884
+ "required": false,
1885
+ "schema": {
1886
+ "type": "string",
1887
+ "enum": [
1888
+ "min",
1889
+ "max",
1890
+ "avg",
1891
+ "average",
1892
+ "median",
1893
+ "stddev",
1894
+ "sum",
1895
+ "incremental-sum",
1896
+ "ses",
1897
+ "des",
1898
+ "cv",
1899
+ "countif",
1900
+ "percentile",
1901
+ "percentile25",
1902
+ "percentile50",
1903
+ "percentile75",
1904
+ "percentile80",
1905
+ "percentile90",
1906
+ "percentile95",
1907
+ "percentile97",
1908
+ "percentile98",
1909
+ "percentile99",
1910
+ "trimmed-mean",
1911
+ "trimmed-mean1",
1912
+ "trimmed-mean2",
1913
+ "trimmed-mean3",
1914
+ "trimmed-mean5",
1915
+ "trimmed-mean10",
1916
+ "trimmed-mean15",
1917
+ "trimmed-mean20",
1918
+ "trimmed-mean25",
1919
+ "trimmed-median",
1920
+ "trimmed-median1",
1921
+ "trimmed-median2",
1922
+ "trimmed-median3",
1923
+ "trimmed-median5",
1924
+ "trimmed-median10",
1925
+ "trimmed-median15",
1926
+ "trimmed-median20",
1927
+ "trimmed-median25"
1928
+ ],
1929
+ "default": "average"
1930
+ }
1931
+ },
1932
+ "dataTimeGroup2": {
1933
+ "name": "time_group",
1934
+ "in": "query",
1935
+ "description": "Time aggregation function. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. If the `absolute` option is set, the values are turned positive before applying this calculation.\n",
1936
+ "required": false,
1937
+ "schema": {
1938
+ "type": "string",
1939
+ "enum": [
1940
+ "min",
1941
+ "max",
1942
+ "avg",
1943
+ "average",
1944
+ "median",
1945
+ "stddev",
1946
+ "sum",
1947
+ "incremental-sum",
1948
+ "ses",
1949
+ "des",
1950
+ "cv",
1951
+ "countif",
1952
+ "percentile",
1953
+ "percentile25",
1954
+ "percentile50",
1955
+ "percentile75",
1956
+ "percentile80",
1957
+ "percentile90",
1958
+ "percentile95",
1959
+ "percentile97",
1960
+ "percentile98",
1961
+ "percentile99",
1962
+ "trimmed-mean",
1963
+ "trimmed-mean1",
1964
+ "trimmed-mean2",
1965
+ "trimmed-mean3",
1966
+ "trimmed-mean5",
1967
+ "trimmed-mean10",
1968
+ "trimmed-mean15",
1969
+ "trimmed-mean20",
1970
+ "trimmed-mean25",
1971
+ "trimmed-median",
1972
+ "trimmed-median1",
1973
+ "trimmed-median2",
1974
+ "trimmed-median3",
1975
+ "trimmed-median5",
1976
+ "trimmed-median10",
1977
+ "trimmed-median15",
1978
+ "trimmed-median20",
1979
+ "trimmed-median25"
1980
+ ],
1981
+ "default": "average"
1982
+ }
1983
+ },
1984
+ "dataTimeGroupOptions1": {
1985
+ "name": "group_options",
1986
+ "in": "query",
1987
+ "description": "When the time grouping function supports additional parameters, this field can be used to pass them to it. Currently `countif`, `trimmed-mean`, `trimmed-median` and `percentile` support this. For `countif` the string may start with `<`, `<=`, `<:`, `<>`, `!=`, `>`, `>=`, `>:`. For all others just a number is expected.\n",
1988
+ "required": false,
1989
+ "schema": {
1990
+ "type": "string"
1991
+ }
1992
+ },
1993
+ "dataTimeGroupOptions2": {
1994
+ "name": "time_group_options",
1995
+ "in": "query",
1996
+ "description": "When the time grouping function supports additional parameters, this field can be used to pass them to it. Currently `countif`, `trimmed-mean`, `trimmed-median` and `percentile` support this. For `countif` the string may start with `<`, `<=`, `<:`, `<>`, `!=`, `>`, `>=`, `>:`. For all others just a number is expected.\n",
1997
+ "required": false,
1998
+ "schema": {
1999
+ "type": "string"
2000
+ }
2001
+ },
2002
+ "dataTimeResampling1": {
2003
+ "name": "gtime",
2004
+ "in": "query",
2005
+ "description": "The grouping number of seconds. This is used in conjunction with group=average to change the units of metrics (ie when the data is per-second, setting gtime=60 will turn them to per-minute).\n",
2006
+ "required": false,
2007
+ "allowEmptyValue": false,
2008
+ "schema": {
2009
+ "type": "number",
2010
+ "format": "integer",
2011
+ "default": 0
2012
+ }
2013
+ },
2014
+ "dataTimeResampling2": {
2015
+ "name": "time_resampling",
2016
+ "in": "query",
2017
+ "description": "For incremental values that are \"per second\", this value is used to resample them to \"per minute` (60) or \"per hour\" (3600). It can only be used in conjunction with group=average.\n",
2018
+ "required": false,
2019
+ "schema": {
2020
+ "type": "number",
2021
+ "format": "integer",
2022
+ "default": 0
2023
+ }
2024
+ },
2025
+ "timeoutMS": {
2026
+ "name": "timeout",
2027
+ "in": "query",
2028
+ "description": "Specify a timeout value in milliseconds after which the agent will abort the query and return a 503 error. A value of 0 indicates no timeout.\n",
2029
+ "required": false,
2030
+ "schema": {
2031
+ "type": "number",
2032
+ "format": "integer",
2033
+ "default": 0
2034
+ }
2035
+ },
2036
+ "timeoutSecs": {
2037
+ "name": "timeout",
2038
+ "in": "query",
2039
+ "description": "Specify a timeout value in seconds after which the agent will abort the query and return a 504 error. A value of 0 indicates no timeout, but some endpoints, like `weights`, do not accept infinite timeouts (they have a predefined default), so to disable the timeout it must be set to a really high value.\n",
2040
+ "required": false,
2041
+ "schema": {
2042
+ "type": "number",
2043
+ "format": "integer",
2044
+ "default": 0
2045
+ }
2046
+ },
2047
+ "before": {
2048
+ "name": "before",
2049
+ "in": "query",
2050
+ "description": "`after` and `before` define the time-frame of a query. `before` can be a negative number of seconds, up to 3 years (-94608000), relative to current clock. If not set, it is assumed to be the current clock time. When `before` is positive, it is assumed to be a unix epoch timestamp. When non-data endpoints support the `after` and `before`, they use the time-frame to limit their response for objects having data retention within the time-frame given.\n",
2051
+ "required": false,
2052
+ "schema": {
2053
+ "type": "integer",
2054
+ "default": 0
2055
+ }
2056
+ },
2057
+ "after": {
2058
+ "name": "after",
2059
+ "in": "query",
2060
+ "description": "`after` and `before` define the time-frame of a query. `after` can be a negative number of seconds, up to 3 years (-94608000), relative to `before`. If not set, it is usually assumed to be -600. When non-data endpoints support the `after` and `before`, they use the time-frame to limit their response for objects having data retention within the time-frame given.\n",
2061
+ "required": false,
2062
+ "schema": {
2063
+ "type": "integer",
2064
+ "default": -600
2065
+ }
2066
+ },
2067
+ "baselineBefore": {
2068
+ "name": "baseline_before",
2069
+ "in": "query",
2070
+ "description": "`baseline_after` and `baseline_before` define the baseline time-frame of a comparative query. `baseline_before` can be a negative number of seconds, up to 3 years (-94608000), relative to current clock. If not set, it is assumed to be the current clock time. When `baseline_before` is positive, it is assumed to be a unix epoch timestamp.\n",
2071
+ "required": false,
2072
+ "schema": {
2073
+ "type": "integer",
2074
+ "default": 0
2075
+ }
2076
+ },
2077
+ "baselineAfter": {
2078
+ "name": "baseline_after",
2079
+ "in": "query",
2080
+ "description": "`baseline_after` and `baseline_before` define the baseline time-frame of a comparative query. `baseline_after` can be a negative number of seconds, up to 3 years (-94608000), relative to `baseline_before`. If not set, it is usually assumed to be -300.\n",
2081
+ "required": false,
2082
+ "schema": {
2083
+ "type": "integer",
2084
+ "default": -600
2085
+ }
2086
+ },
2087
+ "points": {
2088
+ "name": "points",
2089
+ "in": "query",
2090
+ "description": "The number of points to be returned. If not given, or it is <= 0, or it is bigger than the points stored in the database for the given duration, all the available collected values for the given duration will be returned. For `weights` endpoints that do statistical analysis, the `points` define the detail of this analysis (the default is 500).\n",
2091
+ "required": false,
2092
+ "schema": {
2093
+ "type": "number",
2094
+ "format": "integer",
2095
+ "default": 0
2096
+ }
2097
+ },
2098
+ "tier": {
2099
+ "name": "tier",
2100
+ "in": "query",
2101
+ "description": "Use only the given dbengine tier for executing the query. Setting this parameters automatically sets the option `selected-tier` for the query.\n",
2102
+ "required": false,
2103
+ "schema": {
2104
+ "type": "number",
2105
+ "format": "integer"
2106
+ }
2107
+ },
2108
+ "callback": {
2109
+ "name": "callback",
2110
+ "in": "query",
2111
+ "description": "For JSONP responses, the callback function name.\n",
2112
+ "required": false,
2113
+ "schema": {
2114
+ "type": "string"
2115
+ }
2116
+ },
2117
+ "filename": {
2118
+ "name": "filename",
2119
+ "in": "query",
2120
+ "description": "Add `Content-Disposition: attachment; filename=` header to the response, that will instruct the browser to save the response with the given filename.\"\n",
2121
+ "required": false,
2122
+ "schema": {
2123
+ "type": "string"
2124
+ }
2125
+ },
2126
+ "tqx": {
2127
+ "name": "tqx",
2128
+ "in": "query",
2129
+ "description": "[Google Visualization API](https://developers.google.com/chart/interactive/docs/dev/implementing_data_source?hl=en) formatted parameter.\n",
2130
+ "required": false,
2131
+ "schema": {
2132
+ "type": "string"
2133
+ }
2134
+ },
2135
+ "contextOptions1": {
2136
+ "name": "options",
2137
+ "in": "query",
2138
+ "description": "Options that affect data generation.",
2139
+ "required": false,
2140
+ "schema": {
2141
+ "type": "array",
2142
+ "items": {
2143
+ "type": "string",
2144
+ "enum": [
2145
+ "full",
2146
+ "all",
2147
+ "charts",
2148
+ "dimensions",
2149
+ "labels",
2150
+ "uuids",
2151
+ "queue",
2152
+ "flags",
2153
+ "deleted",
2154
+ "deepscan"
2155
+ ]
2156
+ }
2157
+ }
2158
+ },
2159
+ "chart": {
2160
+ "name": "chart",
2161
+ "in": "query",
2162
+ "description": "The id of the chart as returned by the `/api/v1/charts` call.",
2163
+ "required": false,
2164
+ "allowEmptyValue": false,
2165
+ "schema": {
2166
+ "type": "string",
2167
+ "format": "as returned by `/api/v1/charts`"
2168
+ }
2169
+ },
2170
+ "context": {
2171
+ "name": "context",
2172
+ "in": "query",
2173
+ "description": "The context of the chart as returned by the /charts call.",
2174
+ "required": false,
2175
+ "allowEmptyValue": false,
2176
+ "schema": {
2177
+ "type": "string",
2178
+ "format": "as returned by /charts"
2179
+ }
2180
+ },
2181
+ "dimension": {
2182
+ "name": "dimension",
2183
+ "in": "query",
2184
+ "description": "Zero, one or more dimension ids or names, as returned by the /chart call, separated with comma or pipe. Netdata simple patterns are supported.",
2185
+ "required": false,
2186
+ "allowEmptyValue": false,
2187
+ "schema": {
2188
+ "type": "array",
2189
+ "items": {
2190
+ "type": "string",
2191
+ "format": "as returned by /charts"
2192
+ }
2193
+ }
2194
+ },
2195
+ "dimensions": {
2196
+ "name": "dimensions",
2197
+ "in": "query",
2198
+ "description": "a simple pattern matching dimensions (use comma or pipe as separator)",
2199
+ "required": false,
2200
+ "allowEmptyValue": true,
2201
+ "schema": {
2202
+ "type": "string"
2203
+ }
2204
+ },
2205
+ "chart_label_key": {
2206
+ "name": "chart_label_key",
2207
+ "in": "query",
2208
+ "description": "Specify the chart label keys that need to match for context queries as comma separated values. At least one matching key is needed to match the corresponding chart.\n",
2209
+ "required": false,
2210
+ "allowEmptyValue": false,
2211
+ "schema": {
2212
+ "type": "string",
2213
+ "format": "key1,key2,key3"
2214
+ }
2215
+ },
2216
+ "chart_labels_filter": {
2217
+ "name": "chart_labels_filter",
2218
+ "in": "query",
2219
+ "description": "Specify the chart label keys and values to match for context queries. All keys/values need to match for the chart to be included in the query. The labels are specified as key1:value1,key2:value2\n",
2220
+ "required": false,
2221
+ "allowEmptyValue": false,
2222
+ "schema": {
2223
+ "type": "string",
2224
+ "format": "key1:value1,key2:value2,key3:value3"
2225
+ }
2226
+ },
2227
+ "weightMethods": {
2228
+ "name": "method",
2229
+ "in": "query",
2230
+ "description": "The weighting / scoring algorithm.",
2231
+ "required": false,
2232
+ "schema": {
2233
+ "type": "string",
2234
+ "enum": [
2235
+ "ks2",
2236
+ "volume",
2237
+ "anomaly-rate",
2238
+ "value"
2239
+ ]
2240
+ }
2241
+ }
2242
+ },
2243
+ "schemas": {
2244
+ "info": {
2245
+ "type": "object",
2246
+ "properties": {
2247
+ "version": {
2248
+ "type": "string",
2249
+ "description": "netdata version of the server.",
2250
+ "example": "1.11.1_rolling"
2251
},
1829
- {
1830
- "name": "after",
1831
- "in": "query",
1832
- "description": "This parameter can either be an absolute timestamp specifying the starting point of highlighted window, or a relative number of seconds (negative, relative to parameter highlight_before). Netdata will assume it is a relative number if it is less that 3 years (in seconds).",
1833
- "required": false,
1834
- "allowEmptyValue": false,
1835
- "schema": {
1836
- "type": "number",
1837
- "format": "integer",
1838
- "default": -60
1839
- }
2252
+ "uid": {
2253
+ "type": "string",
2254
+ "description": "netdata unique id of the server.",
2255
+ "example": "24e9fe3c-f2ac-11e8-bafc-0242ac110002"
2256
},
1841
- {
1842
- "name": "before",
1843
- "in": "query",
1844
- "description": "This parameter can either be an absolute timestamp specifying the ending point of the highlighted window, or a relative number of seconds (negative), relative to the last collected timestamp. Netdata will assume it is a relative number if it is less than 3 years (in seconds).",
1845
- "required": false,
1846
- "schema": {
1847
- "type": "number",
1848
- "format": "integer",
1849
- "default": 0
1850
- }
2257
+ "mirrored_hosts": {
2258
+ "type": "array",
2259
+ "description": "List of hosts mirrored of the server (include itself).",
2260
+ "items": {
2261
+ "type": "string"
2262
+ },
2263
+ "example": [
2264
+ "host1.example.com",
2265
+ "host2.example.com"
2266
+ ]
2267
},
1852
- {
1853
- "name": "points",
1854
- "in": "query",
1855
- "description": "The number of points to be evaluated for the highlighted window. The baseline window will be adjusted automatically to receive a proportional amount of points.",
1856
- "required": false,
1857
- "allowEmptyValue": false,
1858
- "schema": {
1859
- "type": "number",
1860
- "format": "integer",
1861
- "default": 500
2268
+ "mirrored_hosts_status": {
2269
+ "type": "array",
2270
+ "description": "List of details of hosts mirrored to this served (including self). Indexes correspond to indexes in \"mirrored_hosts\".",
2271
+ "items": {
2272
+ "type": "object",
2273
+ "description": "Host data",
2274
+ "properties": {
2275
+ "guid": {
2276
+ "type": "string",
2277
+ "format": "uuid",
2278
+ "nullable": false,
2279
+ "description": "Host unique GUID from `netdata.public.unique.id`.",
2280
+ "example": "245e4bff-3b34-47c1-a6e5-5c535a9abfb2"
2281
+ },
2282
+ "reachable": {
2283
+ "type": "boolean",
2284
+ "nullable": false,
2285
+ "description": "Current state of streaming. Always true for localhost/self."
2286
+ },
2287
+ "claim_id": {
2288
+ "type": "string",
2289
+ "format": "uuid",
2290
+ "nullable": true,
2291
+ "description": "Cloud GUID/identifier in case the host is claimed. If child status unknown or unclaimed this field is set to `null`",
2292
+ "example": "c3b2a66a-3052-498c-ac52-7fe9e8cccb0c"
2293
+ }
2294
+ }
2295
}
2296
},
1864
- {
1865
- "name": "method",
1866
- "in": "query",
1867
- "description": "the algorithm to run",
1868
- "required": false,
1869
- "schema": {
1870
- "type": "string",
1871
- "enum": [
1872
- "ks2",
1873
- "volume"
1874
- ],
1875
- "default": "ks2"
1876
- }
2297
+ "os_name": {
2298
+ "type": "string",
2299
+ "description": "Operating System Name.",
2300
+ "example": "Manjaro Linux"
2301
},
1878
- {
1879
- "name": "timeout",
1880
- "in": "query",
1881
- "description": "Cancel the query if to takes more that this amount of milliseconds.",
1882
- "required": false,
1883
- "allowEmptyValue": false,
1884
- "schema": {
1885
- "type": "number",
1886
- "format": "integer",
1887
- "default": 60000
1888
- }
2302
+ "os_id": {
2303
+ "type": "string",
2304
+ "description": "Operating System ID.",
2305
+ "example": "manjaro"
2306
},
1890
- {
1891
- "name": "options",
1892
- "in": "query",
1893
- "description": "Options that affect data generation.",
1894
- "required": false,
1895
- "allowEmptyValue": false,
1896
- "schema": {
1897
- "type": "array",
1898
- "items": {
1899
- "type": "string",
1900
- "enum": [
1901
- "min2max",
1902
- "abs",
1903
- "absolute",
1904
- "absolute-sum",
1905
- "null2zero",
1906
- "percentage",
1907
- "unaligned",
1908
- "allow_past",
1909
- "nonzero",
1910
- "anomaly-bit",
1911
- "raw"
1912
- ]
1913
- },
1914
- "default": [
1915
- "null2zero",
1916
- "allow_past",
1917
- "nonzero",
1918
- "unaligned"
1919
- ]
1920
- }
2307
+ "os_id_like": {
2308
+ "type": "string",
2309
+ "description": "Known OS similar to this OS.",
2310
+ "example": "arch"
2311
},
1922
- {
1923
- "name": "group",
1924
- "in": "query",
1925
- "description": "The grouping method. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. methods supported \"min\", \"max\", \"average\", \"sum\", \"incremental-sum\". \"max\" is actually calculated on the absolute value collected (so it works for both positive and negative dimensions to return the most extreme value in either direction).",
1926
- "required": true,
1927
- "allowEmptyValue": false,
1928
- "schema": {
1929
- "type": "string",
1930
- "enum": [
1931
- "min",
1932
- "max",
1933
- "average",
1934
- "median",
1935
- "stddev",
1936
- "sum",
1937
- "incremental-sum",
1938
- "ses",
1939
- "des",
1940
- "cv",
1941
- "countif",
1942
- "percentile",
1943
- "percentile25",
1944
- "percentile50",
1945
- "percentile75",
1946
- "percentile80",
1947
- "percentile90",
1948
- "percentile95",
1949
- "percentile97",
1950
- "percentile98",
1951
- "percentile99",
1952
- "trimmed-mean",
1953
- "trimmed-mean1",
1954
- "trimmed-mean2",
1955
- "trimmed-mean3",
1956
- "trimmed-mean5",
1957
- "trimmed-mean10",
1958
- "trimmed-mean15",
1959
- "trimmed-mean20",
1960
- "trimmed-mean25",
1961
- "trimmed-median",
1962
- "trimmed-median1",
1963
- "trimmed-median2",
1964
- "trimmed-median3",
1965
- "trimmed-median5",
1966
- "trimmed-median10",
1967
- "trimmed-median15",
1968
- "trimmed-median20",
1969
- "trimmed-median25"
1970
- ],
1971
- "default": "average"
1972
- }
1973
- },
1974
- {
1975
- "name": "group_options",
1976
- "in": "query",
1977
- "description": "When the group function supports additional parameters, this field can be used to pass them to it. Currently only \"countif\" supports this.",
1978
- "required": false,
1979
- "allowEmptyValue": false,
1980
- "schema": {
1981
- "type": "string"
1982
- }
1983
- }
1984
- ],
1985
- "responses": {
1986
- "200": {
1987
- "description": "JSON object with weights for each chart and dimension.",
1988
- "content": {
1989
- "application/json": {
1990
- "schema": {
1991
- "$ref": "#/components/schemas/metric_correlations"
1992
- }
1993
- }
1994
- }
2312
+ "os_version": {
2313
+ "type": "string",
2314
+ "description": "Operating System Version.",
2315
+ "example": "18.0.4"
2316
},
1996
- "400": {
1997
- "description": "The given parameters are invalid."
2317
+ "os_version_id": {
2318
+ "type": "string",
2319
+ "description": "Operating System Version ID.",
2320
+ "example": "unknown"
2321
},
1999
- "403": {
2000
- "description": "metrics correlations are not enabled on this Netdata Agent."
2322
+ "os_detection": {
2323
+ "type": "string",
2324
+ "description": "OS parameters detection method.",
2325
+ "example": "Mixed"
2326
},
2002
- "404": {
2003
- "description": "No charts could be found, or the method that correlated the metrics did not produce any result."
2327
+ "kernel_name": {
2328
+ "type": "string",
2329
+ "description": "Kernel Name.",
2330
+ "example": "Linux"
2331
},
2005
- "504": {
2006
- "description": "Timeout - the query took too long and has been cancelled."
2007
- }
2008
- }
2009
- }
2010
- },
2011
- "/api/v1/function": {
2012
- "get": {
2013
- "summary": "Execute a collector function.",
2014
- "parameters": [
2015
- {
2016
- "name": "function",
2017
- "in": "query",
2018
- "description": "The name of the function, as returned by the collector.",
2019
- "required": true,
2020
- "allowEmptyValue": false,
2021
- "schema": {
2022
- "type": "string"
2023
- }
2332
+ "kernel_version": {
2333
+ "type": "string",
2334
+ "description": "Kernel Version.",
2335
+ "example": "4.19.32-1-MANJARO"
2336
},
2025
- {
2026
- "name": "timeout",
2027
- "in": "query",
2028
- "description": "The timeout in seconds to wait for the function to complete.",
2029
- "required": false,
2030
- "schema": {
2031
- "type": "number",
2032
- "format": "integer",
2033
- "default": 10
2034
- }
2035
- }
2036
- ],
2037
- "responses": {
2038
- "200": {
2039
- "description": "The collector function has been executed successfully. Each collector may return a different type of content."
2337
+ "is_k8s_node": {
2338
+ "type": "boolean",
2339
+ "description": "Netdata is running on a K8s node.",
2340
+ "example": false
2341
},
2041
- "400": {
2042
- "description": "The request was rejected by the collector."
2342
+ "architecture": {
2343
+ "type": "string",
2344
+ "description": "Kernel architecture.",
2345
+ "example": "x86_64"
2346
},
2044
- "404": {
2045
- "description": "The requested function is not found."
2347
+ "virtualization": {
2348
+ "type": "string",
2349
+ "description": "Virtualization Type.",
2350
+ "example": "kvm"
2351
},
2047
- "500": {
2048
- "description": "Other internal error, getting this error means there is a bug in Netdata."
2352
+ "virt_detection": {
2353
+ "type": "string",
2354
+ "description": "Virtualization detection method.",
2355
+ "example": "systemd-detect-virt"
2356
},
2050
- "503": {
2051
- "description": "The collector to execute the function is not currently available."
2357
+ "container": {
2358
+ "type": "string",
2359
+ "description": "Container technology.",
2360
+ "example": "docker"
2361
},
2053
- "504": {
2054
- "description": "Timeout while waiting for the collector to execute the function."
2362
+ "container_detection": {
2363
+ "type": "string",
2364
+ "description": "Container technology detection method.",
2365
+ "example": "dockerenv"
2366
},
2056
- "591": {
2057
- "description": "The collector sent a response, but it was invalid or corrupted."
2058
- }
2059
- }
2060
- }
2061
- },
2062
- "/api/v1/functions": {
2063
- "get": {
2064
- "summary": "Get a list of all registered collector functions.",
2065
- "description": "Collector functions are programs that can be executed on demand.",
2066
- "responses": {
2067
- "200": {
2068
- "description": "A JSON object containing one object per supported function."
2069
- }
2070
- }
2071
- }
2072
- },
2073
- "/api/v1/weights": {
2074
- "get": {
2075
- "summary": "Analyze all the metrics using an algorithm and score them accordingly",
2076
- "description": "This endpoint goes through all metrics and scores them according to an algorithm.",
2077
- "parameters": [
2078
- {
2079
- "name": "baseline_after",
2080
- "in": "query",
2081
- "description": "This parameter can either be an absolute timestamp specifying the starting point of baseline window, or a relative number of seconds (negative, relative to parameter baseline_before). Netdata will assume it is a relative number if it is less that 3 years (in seconds). This parameter is used in KS2 and VOLUME algorithms.",
2082
- "required": false,
2083
- "allowEmptyValue": false,
2084
- "schema": {
2085
- "type": "number",
2086
- "format": "integer",
2087
- "default": -300
2088
- }
2367
+ "stream_compression": {
2368
+ "type": "boolean",
2369
+ "description": "Stream transmission compression method.",
2370
+ "example": true
2371
},
2090
- {
2091
- "name": "baseline_before",
2092
- "in": "query",
2093
- "description": "This parameter can either be an absolute timestamp specifying the ending point of the baseline window, or a relative number of seconds (negative), relative to the last collected timestamp. Netdata will assume it is a relative number if it is less than 3 years (in seconds). This parameter is used in KS2 and VOLUME algorithms.",
2094
- "required": false,
2095
- "schema": {
2096
- "type": "number",
2097
- "format": "integer",
2098
- "default": -60
2372
+ "labels": {
2373
+ "type": "object",
2374
+ "description": "List of host labels.",
2375
+ "properties": {
2376
+ "app": {
2377
+ "type": "string",
2378
+ "description": "Host label.",
2379
+ "example": "netdata"
2380
+ }
2381
}
2382
},
2101
- {
2102
- "name": "after",
2103
- "in": "query",
2104
- "description": "This parameter can either be an absolute timestamp specifying the starting point of highlighted window, or a relative number of seconds (negative, relative to parameter highlight_before). Netdata will assume it is a relative number if it is less that 3 years (in seconds).",
2105
- "required": false,
2106
- "allowEmptyValue": false,
2107
- "schema": {
2108
- "type": "number",
2109
- "format": "integer",
2110
- "default": -60
2383
+ "collectors": {
2384
+ "type": "array",
2385
+ "items": {
2386
+ "type": "object",
2387
+ "description": "Array of collector plugins and modules.",
2388
+ "properties": {
2389
+ "plugin": {
2390
+ "type": "string",
2391
+ "description": "Collector plugin.",
2392
+ "example": "python.d.plugin"
2393
+ },
2394
+ "module": {
2395
+ "type": "string",
2396
+ "description": "Module of the collector plugin.",
2397
+ "example": "dockerd"
2398
+ }
2399
+ }
2400
}
2401
},
2113
- {
2114
- "name": "before",
2115
- "in": "query",
2116
- "description": "This parameter can either be an absolute timestamp specifying the ending point of the highlighted window, or a relative number of seconds (negative), relative to the last collected timestamp. Netdata will assume it is a relative number if it is less than 3 years (in seconds).",
2117
- "required": false,
2118
- "schema": {
2119
- "type": "number",
2120
- "format": "integer",
2121
- "default": 0
2402
+ "alarms": {
2403
+ "type": "object",
2404
+ "description": "Number of alarms in the server.",
2405
+ "properties": {
2406
+ "normal": {
2407
+ "type": "integer",
2408
+ "description": "Number of alarms in normal state."
2409
+ },
2410
+ "warning": {
2411
+ "type": "integer",
2412
+ "description": "Number of alarms in warning state."
2413
+ },
2414
+ "critical": {
2415
+ "type": "integer",
2416
+ "description": "Number of alarms in critical state."
2417
+ }
2418
}
2419
+ }
2420
+ }
2421
+ },
2422
+ "chart_summary": {
2423
+ "type": "object",
2424
+ "properties": {
2425
+ "hostname": {
2426
+ "type": "string",
2427
+ "description": "The hostname of the netdata server."
2428
},
2124
- {
2125
- "name": "context",
2126
- "in": "query",
2127
- "description": "A simple pattern matching the contexts to evaluate.",
2128
- "required": false,
2129
- "allowEmptyValue": false,
2130
- "schema": {
2131
- "type": "string"
2132
- }
2429
+ "version": {
2430
+ "type": "string",
2431
+ "description": "netdata version of the server."
2432
},
2134
- {
2135
- "name": "points",
2136
- "in": "query",
2137
- "description": "The number of points to be evaluated for the highlighted window. The baseline window will be adjusted automatically to receive a proportional amount of points. This parameter is only used by the KS2 algorithm.",
2138
- "required": false,
2139
- "allowEmptyValue": false,
2140
- "schema": {
2141
- "type": "number",
2142
- "format": "integer",
2143
- "default": 500
2144
- }
2433
+ "release_channel": {
2434
+ "type": "string",
2435
+ "description": "The release channel of the build on the server.",
2436
+ "example": "nightly"
2437
},
2146
- {
2147
- "name": "method",
2148
- "in": "query",
2149
- "description": "the algorithm to run",
2150
- "required": false,
2151
- "schema": {
2152
- "type": "string",
2153
- "enum": [
2154
- "ks2",
2155
- "volume",
2156
- "anomaly-rate"
2157
- ],
2158
- "default": "anomaly-rate"
2159
- }
2438
+ "timezone": {
2439
+ "type": "string",
2440
+ "description": "The current timezone on the server."
2441
},
2161
- {
2162
- "name": "tier",
2163
- "in": "query",
2164
- "description": "Use the specified database tier",
2165
- "required": false,
2166
- "allowEmptyValue": false,
2167
- "schema": {
2168
- "type": "number",
2169
- "format": "integer"
2170
- }
2442
+ "os": {
2443
+ "type": "string",
2444
+ "description": "The netdata server host operating system.",
2445
+ "enum": [
2446
+ "macos",
2447
+ "linux",
2448
+ "freebsd"
2449
+ ]
2450
},
2172
- {
2173
- "name": "timeout",
2174
- "in": "query",
2175
- "description": "Cancel the query if to takes more that this amount of milliseconds.",
2176
- "required": false,
2177
- "allowEmptyValue": false,
2178
- "schema": {
2179
- "type": "number",
2180
- "format": "integer",
2181
- "default": 60000
2182
- }
2451
+ "history": {
2452
+ "type": "number",
2453
+ "description": "The duration, in seconds, of the round robin database maintained by netdata."
2454
},
2184
- {
2185
- "name": "options",
2186
- "in": "query",
2187
- "description": "Options that affect data generation.",
2188
- "required": false,
2189
- "allowEmptyValue": false,
2190
- "schema": {
2191
- "type": "array",
2192
- "items": {
2193
- "type": "string",
2194
- "enum": [
2195
- "min2max",
2196
- "abs",
2197
- "absolute",
2198
- "absolute-sum",
2199
- "null2zero",
2200
- "percentage",
2201
- "unaligned",
2202
- "nonzero",
2203
- "anomaly-bit",
2204
- "raw"
2205
- ]
2206
- },
2207
- "default": [
2208
- "null2zero",
2209
- "nonzero",
2210
- "unaligned"
2211
- ]
2212
- }
2455
+ "memory_mode": {
2456
+ "type": "string",
2457
+ "description": "The name of the database memory mode on the server."
2458
},
2214
- {
2215
- "name": "group",
2216
- "in": "query",
2217
- "description": "The grouping method. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. methods supported \"min\", \"max\", \"average\", \"sum\", \"incremental-sum\". \"max\" is actually calculated on the absolute value collected (so it works for both positive and negative dimensions to return the most extreme value in either direction).",
2218
- "required": true,
2219
- "allowEmptyValue": false,
2220
- "schema": {
2221
- "type": "string",
2222
- "enum": [
2223
- "min",
2224
- "max",
2225
- "average",
2226
- "median",
2227
- "stddev",
2228
- "sum",
2229
- "incremental-sum",
2230
- "ses",
2231
- "des",
2232
- "cv",
2233
- "countif",
2234
- "percentile",
2235
- "percentile25",
2236
- "percentile50",
2237
- "percentile75",
2238
- "percentile80",
2239
- "percentile90",
2240
- "percentile95",
2241
- "percentile97",
2242
- "percentile98",
2243
- "percentile99",
2244
- "trimmed-mean",
2245
- "trimmed-mean1",
2246
- "trimmed-mean2",
2247
- "trimmed-mean3",
2248
- "trimmed-mean5",
2249
- "trimmed-mean10",
2250
- "trimmed-mean15",
2251
- "trimmed-mean20",
2252
- "trimmed-mean25",
2253
- "trimmed-median",
2254
- "trimmed-median1",
2255
- "trimmed-median2",
2256
- "trimmed-median3",
2257
- "trimmed-median5",
2258
- "trimmed-median10",
2259
- "trimmed-median15",
2260
- "trimmed-median20",
2261
- "trimmed-median25"
2262
- ],
2263
- "default": "average"
2264
- }
2459
+ "update_every": {
2460
+ "type": "number",
2461
+ "description": "The default update frequency of the netdata server. All charts have an update frequency equal or bigger than this."
2462
},
2266
- {
2267
- "name": "group_options",
2268
- "in": "query",
2269
- "description": "When the group function supports additional parameters, this field can be used to pass them to it. Currently only \"countif\" supports this.",
2270
- "required": false,
2271
- "allowEmptyValue": false,
2272
- "schema": {
2273
- "type": "string"
2274
- }
2275
- }
2276
- ],
2277
- "responses": {
2278
- "200": {
2279
- "description": "JSON object with weights for each context, chart and dimension.",
2280
- "content": {
2281
- "application/json": {
2282
- "schema": {
2283
- "$ref": "#/components/schemas/weights"
2284
- }
2285
- }
2463
+ "charts": {
2464
+ "type": "object",
2465
+ "description": "An object containing all the chart objects available at the netdata server. This is used as an indexed array. The key of each chart object is the id of the chart.",
2466
+ "additionalProperties": {
2467
+ "$ref": "#/components/schemas/chart"
2468
}
2469
},
2288
- "400": {
2289
- "description": "The given parameters are invalid."
2470
+ "charts_count": {
2471
+ "type": "number",
2472
+ "description": "The number of charts."
2473
},
2291
- "403": {
2292
- "description": "metrics correlations are not enabled on this Netdata Agent."
2474
+ "dimensions_count": {
2475
+ "type": "number",
2476
+ "description": "The total number of dimensions."
2477
},
2294
- "404": {
2295
- "description": "No charts could be found, or the method that correlated the metrics did not produce any result."
2478
+ "alarms_count": {
2479
+ "type": "number",
2480
+ "description": "The number of alarms."
2481
},
2297
- "504": {
2298
- "description": "Timeout - the query took too long and has been cancelled."
2482
+ "rrd_memory_bytes": {
2483
+ "type": "number",
2484
+ "description": "The size of the round robin database in bytes."
2485
}
2486
}
2301
- }
2302
- }
2303
- },
2304
- "servers": [
2305
- {
2306
- "url": "https://registry.my-netdata.io"
2307
- },
2308
- {
2309
- "url": "http://registry.my-netdata.io"
2310
- },
2311
- {
2312
- "url": "http://localhost:19999"
2313
- }
2314
- ],
2315
- "components": {
2316
- "schemas": {
2317
- "info": {
2487
+ },
2488
+ "chart": {
2489
"type": "object",
2490
"properties": {
2320
- "version": {
2321
- "type": "string",
2322
- "description": "netdata version of the server.",
2323
- "example": "1.11.1_rolling"
2324
- },
2325
- "uid": {
2491
+ "id": {
2492
"type": "string",
2327
- "description": "netdata unique id of the server.",
2328
- "example": "24e9fe3c-f2ac-11e8-bafc-0242ac110002"
2329
- },
2330
- "mirrored_hosts": {
2331
- "type": "array",
2332
- "description": "List of hosts mirrored of the server (include itself).",
2333
- "items": {
2334
- "type": "string"
2335
- },
2336
- "example": [
2337
- "host1.example.com",
2338
- "host2.example.com"
2339
- ]
2340
- },
2341
- "mirrored_hosts_status": {
2342
- "type": "array",
2343
- "description": "List of details of hosts mirrored to this served (including self). Indexes correspond to indexes in \"mirrored_hosts\".",
2344
- "items": {
2345
- "type": "object",
2346
- "description": "Host data",
2347
- "properties": {
2348
- "guid": {
2349
- "type": "string",
2350
- "format": "uuid",
2351
- "nullable": false,
2352
- "description": "Host unique GUID from `netdata.public.unique.id`.",
2353
- "example": "245e4bff-3b34-47c1-a6e5-5c535a9abfb2"
2354
- },
2355
- "reachable": {
2356
- "type": "boolean",
2357
- "nullable": false,
2358
- "description": "Current state of streaming. Always true for localhost/self."
2359
- },
2360
- "claim_id": {
2361
- "type": "string",
2362
- "format": "uuid",
2363
- "nullable": true,
2364
- "description": "Cloud GUID/identifier in case the host is claimed. If child status unknown or unclaimed this field is set to `null`",
2365
- "example": "c3b2a66a-3052-498c-ac52-7fe9e8cccb0c"
2366
- }
2367
- }
2368
- }
2493
+ "description": "The unique id of the chart."
2494
},
2370
- "os_name": {
2495
+ "name": {
2496
"type": "string",
2372
- "description": "Operating System Name.",
2373
- "example": "Manjaro Linux"
2497
+ "description": "The name of the chart."
2498
},
2375
- "os_id": {
2499
+ "type": {
2500
"type": "string",
2377
- "description": "Operating System ID.",
2378
- "example": "manjaro"
2501
+ "description": "The type of the chart. Types are not handled by netdata. You can use this field for anything you like."
2502
},
2380
- "os_id_like": {
2503
+ "family": {
2504
"type": "string",
2382
- "description": "Known OS similar to this OS.",
2383
- "example": "arch"
2505
+ "description": "The family of the chart. Families are not handled by netdata. You can use this field for anything you like."
2506
},
2385
- "os_version": {
2507
+ "title": {
2508
"type": "string",
2387
- "description": "Operating System Version.",
2388
- "example": "18.0.4"
2509
+ "description": "The title of the chart."
2510
},
2390
- "os_version_id": {
2391
- "type": "string",
2392
- "description": "Operating System Version ID.",
2393
- "example": "unknown"
2511
+ "priority": {
2512
+ "type": "number",
2513
+ "description": "The relative priority of the chart. Netdata does not care about priorities. This is just an indication of importance for the chart viewers to sort charts of higher priority (lower number) closer to the top. Priority sorting should only be used among charts of the same type or family."
2514
},
2395
- "os_detection": {
2396
- "type": "string",
2397
- "description": "OS parameters detection method.",
2398
- "example": "Mixed"
2515
+ "enabled": {
2516
+ "type": "boolean",
2517
+ "description": "True when the chart is enabled. Disabled charts do not currently collect values, but they may have historical values available."
2518
},
2400
- "kernel_name": {
2519
+ "units": {
2520
"type": "string",
2402
- "description": "Kernel Name.",
2403
- "example": "Linux"
2521
+ "description": "The unit of measurement for the values of all dimensions of the chart."
2522
},
2405
- "kernel_version": {
2523
+ "data_url": {
2524
"type": "string",
2407
- "description": "Kernel Version.",
2408
- "example": "4.19.32-1-MANJARO"
2409
- },
2410
- "is_k8s_node": {
2411
- "type": "boolean",
2412
- "description": "Netdata is running on a K8s node.",
2413
- "example": false
2525
+ "description": "The absolute path to get data values for this chart. You are expected to use this path as the base when constructing the URL to fetch data values for this chart."
2526
},
2415
- "architecture": {
2527
+ "chart_type": {
2528
"type": "string",
2417
- "description": "Kernel architecture.",
2418
- "example": "x86_64"
2529
+ "description": "The chart type.",
2530
+ "enum": [
2531
+ "line",
2532
+ "area",
2533
+ "stacked"
2534
+ ]
2535
},
2420
- "virtualization": {
2421
- "type": "string",
2422
- "description": "Virtualization Type.",
2423
- "example": "kvm"
2536
+ "duration": {
2537
+ "type": "number",
2538
+ "description": "The duration, in seconds, of the round robin database maintained by netdata."
2539
},
2425
- "virt_detection": {
2426
- "type": "string",
2427
- "description": "Virtualization detection method.",
2428
- "example": "systemd-detect-virt"
2540
+ "first_entry": {
2541
+ "type": "number",
2542
+ "description": "The UNIX timestamp of the first entry (the oldest) in the round robin database."
2543
},
2430
- "container": {
2431
- "type": "string",
2432
- "description": "Container technology.",
2433
- "example": "docker"
2544
+ "last_entry": {
2545
+ "type": "number",
2546
+ "description": "The UNIX timestamp of the latest entry in the round robin database."
2547
},
2435
- "container_detection": {
2436
- "type": "string",
2437
- "description": "Container technology detection method.",
2438
- "example": "dockerenv"
2439
- },
2440
- "stream_compression": {
2441
- "type": "boolean",
2442
- "description": "Stream transmission compression method.",
2443
- "example": true
2444
- },
2445
- "labels": {
2446
- "type": "object",
2447
- "description": "List of host labels.",
2448
- "properties": {
2449
- "app": {
2450
- "type": "string",
2451
- "description": "Host label.",
2452
- "example": "netdata"
2453
- }
2454
- }
2455
- },
2456
- "collectors": {
2457
- "type": "array",
2458
- "items": {
2459
- "type": "object",
2460
- "description": "Array of collector plugins and modules.",
2461
- "properties": {
2462
- "plugin": {
2463
- "type": "string",
2464
- "description": "Collector plugin.",
2465
- "example": "python.d.plugin"
2466
- },
2467
- "module": {
2468
- "type": "string",
2469
- "description": "Module of the collector plugin.",
2470
- "example": "dockerd"
2471
- }
2472
- }
2473
- }
2474
- },
2475
- "alarms": {
2476
- "type": "object",
2477
- "description": "Number of alarms in the server.",
2478
- "properties": {
2479
- "normal": {
2480
- "type": "integer",
2481
- "description": "Number of alarms in normal state."
2482
- },
2483
- "warning": {
2484
- "type": "integer",
2485
- "description": "Number of alarms in warning state."
2486
- },
2487
- "critical": {
2488
- "type": "integer",
2489
- "description": "Number of alarms in critical state."
2490
- }
2491
- }
2492
- }
2493
- }
2494
- },
2495
- "chart_summary": {
2496
- "type": "object",
2497
- "properties": {
2498
- "hostname": {
2499
- "type": "string",
2500
- "description": "The hostname of the netdata server."
2501
- },
2502
- "version": {
2503
- "type": "string",
2504
- "description": "netdata version of the server."
2505
- },
2506
- "release_channel": {
2507
- "type": "string",
2508
- "description": "The release channel of the build on the server.",
2509
- "example": "nightly"
2510
- },
2511
- "timezone": {
2512
- "type": "string",
2513
- "description": "The current timezone on the server."
2514
- },
2515
- "os": {
2516
- "type": "string",
2517
- "description": "The netdata server host operating system.",
2518
- "enum": [
2519
- "macos",
2520
- "linux",
2521
- "freebsd"
2522
- ]
2523
- },
2524
- "history": {
2525
- "type": "number",
2526
- "description": "The duration, in seconds, of the round robin database maintained by netdata."
2527
- },
2528
- "memory_mode": {
2529
- "type": "string",
2530
- "description": "The name of the database memory mode on the server."
2531
- },
2532
- "update_every": {
2533
- "type": "number",
2534
- "description": "The default update frequency of the netdata server. All charts have an update frequency equal or bigger than this."
2535
- },
2536
- "charts": {
2537
- "type": "object",
2538
- "description": "An object containing all the chart objects available at the netdata server. This is used as an indexed array. The key of each chart object is the id of the chart.",
2539
- "additionalProperties": {
2540
- "$ref": "#/components/schemas/chart"
2541
- }
2542
- },
2543
- "charts_count": {
2544
- "type": "number",
2545
- "description": "The number of charts."
2546
- },
2547
- "dimensions_count": {
2548
- "type": "number",
2549
- "description": "The total number of dimensions."
2550
- },
2551
- "alarms_count": {
2552
- "type": "number",
2553
- "description": "The number of alarms."
2554
- },
2555
- "rrd_memory_bytes": {
2556
- "type": "number",
2557
- "description": "The size of the round robin database in bytes."
2558
- }
2559
- }
2560
- },
2561
- "chart": {
2562
- "type": "object",
2563
- "properties": {
2564
- "id": {
2565
- "type": "string",
2566
- "description": "The unique id of the chart."
2567
- },
2568
- "name": {
2569
- "type": "string",
2570
- "description": "The name of the chart."
2571
- },
2572
- "type": {
2573
- "type": "string",
2574
- "description": "The type of the chart. Types are not handled by netdata. You can use this field for anything you like."
2575
- },
2576
- "family": {
2577
- "type": "string",
2578
- "description": "The family of the chart. Families are not handled by netdata. You can use this field for anything you like."
2579
- },
2580
- "title": {
2581
- "type": "string",
2582
- "description": "The title of the chart."
2583
- },
2584
- "priority": {
2585
- "type": "number",
2586
- "description": "The relative priority of the chart. Netdata does not care about priorities. This is just an indication of importance for the chart viewers to sort charts of higher priority (lower number) closer to the top. Priority sorting should only be used among charts of the same type or family."
2587
- },
2588
- "enabled": {
2589
- "type": "boolean",
2590
- "description": "True when the chart is enabled. Disabled charts do not currently collect values, but they may have historical values available."
2591
- },
2592
- "units": {
2593
- "type": "string",
2594
- "description": "The unit of measurement for the values of all dimensions of the chart."
2595
- },
2596
- "data_url": {
2597
- "type": "string",
2598
- "description": "The absolute path to get data values for this chart. You are expected to use this path as the base when constructing the URL to fetch data values for this chart."
2599
- },
2600
- "chart_type": {
2601
- "type": "string",
2602
- "description": "The chart type.",
2603
- "enum": [
2604
- "line",
2605
- "area",
2606
- "stacked"
2607
- ]
2608
- },
2609
- "duration": {
2610
- "type": "number",
2611
- "description": "The duration, in seconds, of the round robin database maintained by netdata."
2612
- },
2613
- "first_entry": {
2614
- "type": "number",
2615
- "description": "The UNIX timestamp of the first entry (the oldest) in the round robin database."
2616
- },
2617
- "last_entry": {
2618
- "type": "number",
2619
- "description": "The UNIX timestamp of the latest entry in the round robin database."
2620
- },
2621
- "update_every": {
2622
- "type": "number",
2623
- "description": "The update frequency of this chart, in seconds. One value every this amount of time is kept in the round robin database."
2548
+ "update_every": {
2549
+ "type": "number",
2550
+ "description": "The update frequency of this chart, in seconds. One value every this amount of time is kept in the round robin database."
2551
},
2552
"dimensions": {
2553
"type": "object",
2627
- "description": "An object containing all the chart dimensions available for the chart. This is used as an indexed array. For each pair in the dictionary: the key is the id of the dimension and the value is a dictionary containing the name.",
2554
+ "description": "An object containing all the chart dimensions available for the chart. This is used as an indexed array. For each pair in the dictionary: the key is the id of the dimension and the value is a dictionary containing the name.\"\n",
2555
"additionalProperties": {
2556
"type": "object",
2557
"properties": {
2733
}
2734
}
2735
},
2809
- "data": {
2736
+ "jsonwrap2": {
2737
+ "description": "Data response with `format=json2`\n",
2738
"type": "object",
2811
- "discriminator": {
2812
- "propertyName": "format"
2813
- },
2814
- "description": "Response will contain the appropriate subtype, e.g. data_json depending on the requested format.",
2739
"properties": {
2740
"api": {
2817
- "type": "number",
2818
- "description": "The API version this conforms to, currently 1."
2819
- },
2820
- "id": {
2821
- "type": "string",
2822
- "description": "The unique id of the chart."
2823
- },
2824
- "name": {
2825
- "type": "string",
2826
- "description": "The name of the chart."
2827
- },
2828
- "update_every": {
2829
- "type": "number",
2830
- "description": "The update frequency of this chart, in seconds. One value every this amount of time is kept in the round robin database (independently of the current view)."
2831
- },
2832
- "view_update_every": {
2833
- "type": "number",
2834
- "description": "The current view appropriate update frequency of this chart, in seconds. There is no point to request chart refreshes, using the same settings, more frequently than this."
2835
- },
2836
- "first_entry": {
2837
- "type": "number",
2838
- "description": "The UNIX timestamp of the first entry (the oldest) in the round robin database (independently of the current view)."
2839
- },
2840
- "last_entry": {
2841
- "type": "number",
2842
- "description": "The UNIX timestamp of the latest entry in the round robin database (independently of the current view)."
2843
- },
2844
- "after": {
2845
- "type": "number",
2846
- "description": "The UNIX timestamp of the first entry (the oldest) returned in this response."
2847
- },
2848
- "before": {
2849
- "type": "number",
2850
- "description": "The UNIX timestamp of the latest entry returned in this response."
2851
- },
2852
- "min": {
2853
- "type": "number",
2854
- "description": "The minimum value returned in the current view. This can be used to size the y-series of the chart."
2855
- },
2856
- "max": {
2857
- "type": "number",
2858
- "description": "The maximum value returned in the current view. This can be used to size the y-series of the chart."
2859
- },
2860
- "dimension_names": {
2861
- "description": "The dimension names of the chart as returned in the current view.",
2862
- "type": "array",
2863
- "items": {
2864
- "type": "string"
2865
- }
2741
+ "$ref": "#/components/schemas/api"
2742
},
2867
- "dimension_ids": {
2868
- "description": "The dimension IDs of the chart as returned in the current view.",
2869
- "type": "array",
2870
- "items": {
2871
- "type": "string"
2872
- }
2743
+ "agents": {
2744
+ "$ref": "#/components/schemas/agents"
2745
},
2874
- "latest_values": {
2875
- "description": "The latest values collected for the chart (independently of the current view).",
2876
- "type": "array",
2877
- "items": {
2878
- "type": "string"
2879
- }
2880
- },
2881
- "view_latest_values": {
2882
- "description": "The latest values returned with this response.",
2883
- "type": "array",
2884
- "items": {
2885
- "type": "string"
2886
- }
2887
- },
2888
- "dimensions": {
2889
- "type": "number",
2890
- "description": "The number of dimensions returned."
2891
- },
2892
- "points": {
2893
- "type": "number",
2894
- "description": "The number of rows / points returned."
2895
- },
2896
- "format": {
2897
- "type": "string",
2898
- "description": "The format of the result returned."
2899
- },
2900
- "chart_variables": {
2901
- "type": "object",
2902
- "additionalProperties": {
2903
- "$ref": "#/components/schemas/chart_variables"
2904
- }
2905
- }
2906
- }
2907
- },
2908
- "data_json2": {
2909
- "description": "Data response with `format=json2`\n",
2910
- "type": "object",
2911
- "properties": {
2912
- "versions": {
2913
- "description": "Hashes that allow the caller to detect important database changes of Netdata agents.\n",
2914
- "type": "object",
2915
- "properties": {
2916
- "contexts_hard_hash": {
2917
- "description": "An auto-increment value that reflects the number of changes to the number of contexts maintained by the server. Everytime a context is added or removed, this number gets incremented.\n",
2918
- "type": "integer"
2919
- },
2920
- "contexts_soft_hash": {
2921
- "description": "An auto-increment value that reflects the number of changes to the queue that sends contexts updates to Netdata Cloud. Everytime the contents of a context are updated, this number gets incremented.\n",
2922
- "type": "integer"
2923
- }
2924
- }
2746
+ "versions": {
2747
+ "$ref": "#/components/schemas/versions"
2748
},
2749
"summary": {
2750
"description": "Summarized information about nodes, contexts, instances, labels, alerts, and dimensions. The items returned are determined by the scope of the query only, however the statistical data in them are influenced by the filters of the query. Using this information the dashboard allows users to slice and dice the data by filtering and grouping.\n",
2753
"nodes": {
2754
"type": "array",
2755
"items": {
2933
- "type": "object",
2934
- "description": "An object describing a node. `is` stands for instances, `ds` for dimensions, `al` for alerts, `sts` for statistics.\n",
2935
- "properties": {
2936
- "ni": {
2937
- "description": "the node index id, a number that uniquely identifies this node for this query.",
2938
- "type": "integer"
2939
- },
2940
- "mg": {
2941
- "description": "the machine guid of the node.",
2942
- "type": "string",
2943
- "format": "UUID"
2944
- },
2945
- "nd": {
2946
- "description": "the node id of the node.",
2947
- "type": "string",
2948
- "format": "UUID"
2949
- },
2950
- "nm": {
2951
- "description": "the name (hostname) of the node.",
2952
- "type": "string"
2953
- },
2954
- "is": {
2955
- "$ref": "#/components/schemas/data_json2_items_count"
2956
- },
2957
- "ds": {
2958
- "$ref": "#/components/schemas/data_json2_items_count"
2959
- },
2960
- "al": {
2961
- "$ref": "#/components/schemas/data_json2_alerts_count"
2962
- },
2963
- "sts": {
2964
- "oneOf": [
2965
- {
2966
- "$ref": "#/components/schemas/data_json2_sts"
2967
- },
2968
- {
2969
- "$ref": "#/components/schemas/data_json2_sts_raw"
2970
- }
2971
- ]
2972
- }
2973
- }
2756
+ "$ref": "#/components/schemas/nodeWithDataStatistics"
2757
}
2758
},
2759
"contexts": {
2767
"type": "string"
2768
},
2769
"is": {
2987
- "$ref": "#/components/schemas/data_json2_items_count"
2770
+ "$ref": "#/components/schemas/jsonwrap2_items_count"
2771
},
2772
"ds": {
2990
- "$ref": "#/components/schemas/data_json2_items_count"
2773
+ "$ref": "#/components/schemas/jsonwrap2_items_count"
2774
},
2775
"al": {
2993
- "$ref": "#/components/schemas/data_json2_alerts_count"
2776
+ "$ref": "#/components/schemas/jsonwrap2_alerts_count"
2777
},
2778
"sts": {
2779
"oneOf": [
2780
{
2998
- "$ref": "#/components/schemas/data_json2_sts"
2781
+ "$ref": "#/components/schemas/jsonwrap2_sts"
2782
},
2783
{
3001
- "$ref": "#/components/schemas/data_json2_sts_raw"
2784
+ "$ref": "#/components/schemas/jsonwrap2_sts_raw"
2785
}
2786
]
2787
}
2806
"description": "the node index id this instance belongs to. The UI uses this to compone the fully qualified name of the instance, using the node hostname to present it to users and its machine guid to add it to filters."
2807
},
2808
"ds": {
3026
- "$ref": "#/components/schemas/data_json2_items_count"
2809
+ "$ref": "#/components/schemas/jsonwrap2_items_count"
2810
},
2811
"al": {
3029
- "$ref": "#/components/schemas/data_json2_alerts_count"
2812
+ "$ref": "#/components/schemas/jsonwrap2_alerts_count"
2813
},
2814
"sts": {
2815
"oneOf": [
2816
{
3034
- "$ref": "#/components/schemas/data_json2_sts"
2817
+ "$ref": "#/components/schemas/jsonwrap2_sts"
2818
},
2819
{
3037
- "$ref": "#/components/schemas/data_json2_sts_raw"
2820
+ "$ref": "#/components/schemas/jsonwrap2_sts_raw"
2821
}
2822
]
2823
}
2839
"type": "string"
2840
},
2841
"ds": {
3059
- "$ref": "#/components/schemas/data_json2_items_count"
2842
+ "$ref": "#/components/schemas/jsonwrap2_items_count"
2843
},
2844
"sts": {
2845
"oneOf": [
2846
{
3064
- "$ref": "#/components/schemas/data_json2_sts"
2847
+ "$ref": "#/components/schemas/jsonwrap2_sts"
2848
},
2849
{
3067
- "$ref": "#/components/schemas/data_json2_sts_raw"
2850
+ "$ref": "#/components/schemas/jsonwrap2_sts_raw"
2851
}
2852
]
2853
}
2865
"type": "string"
2866
},
2867
"ds": {
3085
- "$ref": "#/components/schemas/data_json2_items_count"
2868
+ "$ref": "#/components/schemas/jsonwrap2_items_count"
2869
},
2870
"sts": {
2871
"oneOf": [
2872
{
3090
- "$ref": "#/components/schemas/data_json2_sts"
2873
+ "$ref": "#/components/schemas/jsonwrap2_sts"
2874
},
2875
{
3093
- "$ref": "#/components/schemas/data_json2_sts_raw"
2876
+ "$ref": "#/components/schemas/jsonwrap2_sts_raw"
2877
}
2878
]
2879
},
2888
"type": "string"
2889
},
2890
"ds": {
3108
- "$ref": "#/components/schemas/data_json2_items_count"
2891
+ "$ref": "#/components/schemas/jsonwrap2_items_count"
2892
},
2893
"sts": {
2894
"oneOf": [
2895
{
3113
- "$ref": "#/components/schemas/data_json2_sts"
2896
+ "$ref": "#/components/schemas/jsonwrap2_sts"
2897
},
2898
{
3116
- "$ref": "#/components/schemas/data_json2_sts_raw"
2899
+ "$ref": "#/components/schemas/jsonwrap2_sts_raw"
2900
}
2901
]
2902
}
2910
"description": "An array of all the unique alerts running, grouped by alert name (`nm` is available here)\n",
2911
"type": "array",
2912
"items": {
3130
- "$ref": "#/components/schemas/data_json2_alerts_count"
2913
+ "$ref": "#/components/schemas/jsonwrap2_alerts_count"
2914
}
2915
}
2916
}
2919
"type": "object",
2920
"properties": {
2921
"nodes": {
3139
- "$ref": "#/components/schemas/data_json2_items_count"
2922
+ "$ref": "#/components/schemas/jsonwrap2_items_count"
2923
},
2924
"contexts": {
3142
- "$ref": "#/components/schemas/data_json2_items_count"
2925
+ "$ref": "#/components/schemas/jsonwrap2_items_count"
2926
},
2927
"instances": {
3145
- "$ref": "#/components/schemas/data_json2_items_count"
2928
+ "$ref": "#/components/schemas/jsonwrap2_items_count"
2929
},
2930
"dimensions": {
3148
- "$ref": "#/components/schemas/data_json2_items_count"
2931
+ "$ref": "#/components/schemas/jsonwrap2_items_count"
2932
},
2933
"label_keys": {
3151
- "$ref": "#/components/schemas/data_json2_items_count"
2934
+ "$ref": "#/components/schemas/jsonwrap2_items_count"
2935
},
2936
"label_key_values": {
3154
- "$ref": "#/components/schemas/data_json2_items_count"
2937
+ "$ref": "#/components/schemas/jsonwrap2_items_count"
2938
}
2939
}
2940
},
3005
"type": "string"
3006
},
3007
"format": {
3225
- "description": "The format the `result` top level member has.\n",
3008
+ "description": "The format the `result` top level member has. Available on when `debug` flag is set.\n",
3009
"type": "string"
3010
},
3011
"options": {
3229
- "description": "An array presenting all the options given to the query.\n",
3012
+ "description": "An array presenting all the options given to the query. Available on when `debug` flag is set.\n",
3013
"type": "array",
3014
"items": {
3015
"type": "string"
3016
}
3017
},
3018
"time_group": {
3236
- "description": "The same as the parameter `time_group`.\n",
3019
+ "description": "The same as the parameter `time_group`. Available on when `debug` flag is set.\n",
3020
"type": "string"
3021
},
3022
"after": {
3023
"description": "The oldest unix epoch timestamp of the data returned in the `result`.\n",
3024
"type": "integer"
3025
},
3243
- "before": {
3244
- "description": "The newest unix epoch timestamp of the data returned in the `result`.\n",
3026
+ "before": {
3027
+ "description": "The newest unix epoch timestamp of the data returned in the `result`.\n",
3028
+ "type": "integer"
3029
+ },
3030
+ "partial_data_trimming": {
3031
+ "description": "Information related to trimming of the last few points of the `result`, that was required to remove (increasing) partial data.\nTrimming is disabled when the `raw` option is given to the query.\nThis object is available only when the `debug` flag is set.\n",
3032
+ "type": "object",
3033
+ "properties": {
3034
+ "max_update_every": {
3035
+ "description": "The maximum `update_every` for all metrics aggregated into the query.\nTrimming is by default enabled at `view.before - max_update_every`, but only when `view.before >= now - max_update_every`.\n",
3036
+ "type": "integer"
3037
+ },
3038
+ "expected_after": {
3039
+ "description": "The timestamp at which trimming can be enabled.\nIf this timestamp is greater or equal to `view.before`, there is no trimming.\n",
3040
+ "type": "integer"
3041
+ },
3042
+ "trimmed_after": {
3043
+ "description": "The timestamp at which trimming has been applied.\nIf this timestamp is greater or equal to `view.before`, there is no trimming.\n"
3044
+ }
3045
+ }
3046
+ },
3047
+ "points": {
3048
+ "description": "The number of points in `result`. Available only when `raw` is given.\n",
3049
+ "type": "integer"
3050
+ },
3051
+ "units": {
3052
+ "description": "The units of the query.\n",
3053
+ "oneOf": [
3054
+ {
3055
+ "type": "string"
3056
+ },
3057
+ {
3058
+ "type": "array",
3059
+ "items": {
3060
+ "type": "string"
3061
+ }
3062
+ }
3063
+ ]
3064
+ },
3065
+ "chart_type": {
3066
+ "description": "The default chart type of the query.\n",
3067
+ "type": "string",
3068
+ "enum": [
3069
+ "line",
3070
+ "area",
3071
+ "stacked"
3072
+ ]
3073
+ },
3074
+ "dimensions": {
3075
+ "description": "Detailed information about the chart dimensions included in the `result`.\n",
3076
+ "type": "object",
3077
+ "properties": {
3078
+ "grouped_by": {
3079
+ "description": "An array with the order of the groupings performed.\n",
3080
+ "type": "array",
3081
+ "items": {
3082
+ "type": "string",
3083
+ "enum": [
3084
+ "selected",
3085
+ "dimension",
3086
+ "instance",
3087
+ "node",
3088
+ "context",
3089
+ "units",
3090
+ "label:key1",
3091
+ "label:key2",
3092
+ "label:keyN"
3093
+ ]
3094
+ }
3095
+ },
3096
+ "ids": {
3097
+ "description": "An array with the dimension ids that uniquely identify the dimensions for this query.\n",
3098
+ "type": "array",
3099
+ "items": {
3100
+ "type": "string"
3101
+ }
3102
+ },
3103
+ "names": {
3104
+ "description": "An array with the dimension names to be presented to users. Names may be overlapping, but IDs are not.\n",
3105
+ "type": "array",
3106
+ "items": {
3107
+ "type": "string"
3108
+ }
3109
+ },
3110
+ "units": {
3111
+ "description": "An array with the units each dimension has.\n",
3112
+ "type": "array",
3113
+ "items": {
3114
+ "type": "string"
3115
+ }
3116
+ },
3117
+ "priorities": {
3118
+ "description": "An array with the relative priorities of the dimensions.\nNumbers may not be sequential or unique. The application is expected to order by this and then by name.\n",
3119
+ "type": "array",
3120
+ "items": {
3121
+ "type": "integer"
3122
+ }
3123
+ },
3124
+ "aggregated": {
3125
+ "description": "An array with the number of source metrics aggregated into each dimension.\n",
3126
+ "type": "array",
3127
+ "items": {
3128
+ "type": "integer"
3129
+ }
3130
+ },
3131
+ "min": {
3132
+ "description": "An array of the minimum value of each dimension across the entire query.\n",
3133
+ "type": "array",
3134
+ "items": {
3135
+ "type": "number"
3136
+ }
3137
+ },
3138
+ "max": {
3139
+ "description": "An array of the maximum value of each dimension across the entire query.\n",
3140
+ "type": "array",
3141
+ "items": {
3142
+ "type": "number"
3143
+ }
3144
+ },
3145
+ "avg": {
3146
+ "description": "An array of the average value of each dimension across the entire query.\n",
3147
+ "type": "array",
3148
+ "items": {
3149
+ "type": "number"
3150
+ }
3151
+ },
3152
+ "sts": {
3153
+ "description": "Statistics about the data collection points used for each dimension.\n",
3154
+ "type": "object",
3155
+ "properties": {
3156
+ "min": {
3157
+ "description": "An array with the minimum data collection value aggregated to each dimension.\n",
3158
+ "type": "array",
3159
+ "items": {
3160
+ "type": "number"
3161
+ }
3162
+ },
3163
+ "max": {
3164
+ "description": "An array with the maximum data collection value aggregated to each dimension.\n",
3165
+ "type": "array",
3166
+ "items": {
3167
+ "type": "number"
3168
+ }
3169
+ },
3170
+ "sum": {
3171
+ "description": "An array with the sum of all data collection values aggregated to each dimension.\nThis member exists only when option `raw` is given.\n",
3172
+ "type": "array",
3173
+ "items": {
3174
+ "type": "number"
3175
+ }
3176
+ },
3177
+ "cnt": {
3178
+ "description": "An array with the count of the data collection values aggregated to each dimension.\nThis member exists only when option `raw` is given.\n",
3179
+ "type": "array",
3180
+ "items": {
3181
+ "type": "number"
3182
+ }
3183
+ },
3184
+ "ars": {
3185
+ "description": "An array with the anomaly rate sum of all data collection values aggregated to each dimension.\nThis member exists only when option `raw` is given.\n",
3186
+ "type": "array",
3187
+ "items": {
3188
+ "type": "number"
3189
+ }
3190
+ },
3191
+ "avg": {
3192
+ "description": "An array with the average of all data collection values aggregated to each dimension.\nThis member exists only when option `raw` is not given. When option `raw` is given, the average can be calculated by dividing `sum` with `cnt`.\n",
3193
+ "type": "array",
3194
+ "items": {
3195
+ "type": "number"
3196
+ }
3197
+ },
3198
+ "arp": {
3199
+ "description": "An array with the average anomaly rate of all data collection values aggregated to each dimension.\nThis member exists only when option `raw` is not given. When option `raw` is given, the average can be calculated by dividing `ars` with `cnt`.\n",
3200
+ "type": "array",
3201
+ "items": {
3202
+ "type": "number"
3203
+ }
3204
+ },
3205
+ "con": {
3206
+ "description": "An array with the contribution % of all data collection values aggregated to each dimension.\nThis member exists only when option `raw` is not given. When option `raw` is given, the contribution can be calculated by multiplying `ABS(sum)` with 100.0 and dividing it with the total of the ABS(sum) of all dimensions.\n",
3207
+ "type": "array",
3208
+ "items": {
3209
+ "type": "number"
3210
+ }
3211
+ }
3212
+ }
3213
+ },
3214
+ "labels": {
3215
+ "description": "The labels associated with each dimension in the query.\nThis object is only available when the `group-by-labels` option is given to the query.\n",
3216
+ "type": "object",
3217
+ "properties": {
3218
+ "label_key1": {
3219
+ "description": "An array having one entry for each of the dimensions of the query.\n",
3220
+ "type": "array",
3221
+ "items": {
3222
+ "description": "An array having one entry for each of the values this label key has for the given dimension.\n",
3223
+ "type": "array",
3224
+ "items": {
3225
+ "type": "string"
3226
+ }
3227
+ }
3228
+ }
3229
+ }
3230
+ }
3231
+ }
3232
+ },
3233
+ "min": {
3234
+ "description": "The minimum value of all points included in the `result`.\n",
3235
+ "type": "number"
3236
+ },
3237
+ "max": {
3238
+ "description": "The maximum value of all points included in the `result`.\n",
3239
+ "type": "number"
3240
+ }
3241
+ }
3242
+ },
3243
+ "result": {
3244
+ "$ref": "#/components/schemas/data_json_formats2"
3245
+ },
3246
+ "timings": {
3247
+ "type": "object"
3248
+ }
3249
+ }
3250
+ },
3251
+ "jsonwrap2_sts": {
3252
+ "description": "Statistical values\n",
3253
+ "type": "object",
3254
+ "properties": {
3255
+ "min": {
3256
+ "description": "The minimum value of all metrics aggregated",
3257
+ "type": "number"
3258
+ },
3259
+ "max": {
3260
+ "description": "The maximum value of all metrics aggregated",
3261
+ "type": "number"
3262
+ },
3263
+ "avg": {
3264
+ "description": "The average value of all metrics aggregated",
3265
+ "type": "number"
3266
+ },
3267
+ "arp": {
3268
+ "description": "The average anomaly rate of all metrics aggregated",
3269
+ "type": "number"
3270
+ },
3271
+ "con": {
3272
+ "description": "The contribution percentage of all the metrics aggregated",
3273
+ "type": "number"
3274
+ }
3275
+ }
3276
+ },
3277
+ "jsonwrap2_sts_raw": {
3278
+ "description": "Statistical values when `raw` option is given.\n",
3279
+ "type": "object",
3280
+ "properties": {
3281
+ "min": {
3282
+ "description": "The minimum value of all metrics aggregated",
3283
+ "type": "number"
3284
+ },
3285
+ "max": {
3286
+ "description": "The maximum value of all metrics aggregated",
3287
+ "type": "number"
3288
+ },
3289
+ "sum": {
3290
+ "description": "The sum value of all metrics aggregated",
3291
+ "type": "number"
3292
+ },
3293
+ "ars": {
3294
+ "description": "The sum anomaly rate of all metrics aggregated",
3295
+ "type": "number"
3296
+ },
3297
+ "vol": {
3298
+ "description": "The volume of all the metrics aggregated",
3299
+ "type": "number"
3300
+ },
3301
+ "cnt": {
3302
+ "description": "The count of all metrics aggregated",
3303
+ "type": "integer"
3304
+ }
3305
+ }
3306
+ },
3307
+ "jsonwrap2_items_count": {
3308
+ "description": "Depending on the placement of this object, `items` may be `nodes`, `contexts`, `instances`, `dimensions`, `label keys`, `label key-value pairs`. Furthermore, if the whole object is missing it should be assumed that all its members are zero.\n",
3309
+ "type": "object",
3310
+ "properties": {
3311
+ "sl": {
3312
+ "description": "The number of items `selected` to query. If absent it is zero.",
3313
+ "type": "integer"
3314
+ },
3315
+ "ex": {
3316
+ "description": "The number of items `excluded` from querying. If absent it is zero.",
3317
+ "type": "integer"
3318
+ },
3319
+ "qr": {
3320
+ "description": "The number of items (out of `selected`) the query successfully `queried`. If absent it is zero.",
3321
+ "type": "integer"
3322
+ },
3323
+ "fl": {
3324
+ "description": "The number of items (from `selected`) that `failed` to be queried. If absent it is zero.",
3325
+ "type": "integer"
3326
+ }
3327
+ }
3328
+ },
3329
+ "jsonwrap2_alerts_count": {
3330
+ "description": "Counters about alert statuses. If this object is missing, it is assumed that all its members are zero.\n",
3331
+ "type": "object",
3332
+ "properties": {
3333
+ "nm": {
3334
+ "description": "The name of the alert. Can be absent when the counters refer to more than one alert instances.",
3335
+ "type": "string"
3336
+ },
3337
+ "cl": {
3338
+ "description": "The number of CLEAR alerts. If absent, it is zero.",
3339
+ "type": "integer"
3340
+ },
3341
+ "wr": {
3342
+ "description": "The number of WARNING alerts. If absent, it is zero.",
3343
+ "type": "integer"
3344
+ },
3345
+ "cr": {
3346
+ "description": "The number of CRITICAL alerts. If absent, it is zero.",
3347
+ "type": "integer"
3348
+ },
3349
+ "ot": {
3350
+ "description": "The number of alerts that are not CLEAR, WARNING, CRITICAL (so, they are \"other\"). If absent, it is zero.\n",
3351
+ "type": "integer"
3352
+ }
3353
+ }
3354
+ },
3355
+ "api": {
3356
+ "description": "The version of the API used.",
3357
+ "type": "integer"
3358
+ },
3359
+ "agents": {
3360
+ "description": "An array of agent definitions consulted to compose this response.\n",
3361
+ "type": "array",
3362
+ "items": {
3363
+ "type": "object",
3364
+ "properties": {
3365
+ "mg": {
3366
+ "description": "The agent machine GUID.",
3367
+ "type": "string",
3368
+ "format": "uuid"
3369
+ },
3370
+ "nd": {
3371
+ "description": "The agent cloud node ID.",
3372
+ "type": "string",
3373
+ "format": "uuid"
3374
+ },
3375
+ "nm": {
3376
+ "description": "The agent hostname.",
3377
+ "type": "string"
3378
+ },
3379
+ "ai": {
3380
+ "description": "The agent index ID for this agent, in this response.",
3381
+ "type": "integer"
3382
+ },
3383
+ "now": {
3384
+ "description": "The current unix epoch timestamp of this agent.",
3385
+ "type": "integer"
3386
+ }
3387
+ }
3388
+ }
3389
+ },
3390
+ "versions": {
3391
+ "description": "Hashes that allow the caller to detect important database changes of Netdata agents.\n",
3392
+ "type": "object",
3393
+ "properties": {
3394
+ "nodes_hard_hash": {
3395
+ "description": "An auto-increment value that reflects the number of changes to the number of nodes maintained by the server. Everytime a node is added or removed, this number gets incremented.\n",
3396
+ "type": "integer"
3397
+ },
3398
+ "contexts_hard_hash": {
3399
+ "description": "An auto-increment value that reflects the number of changes to the number of contexts maintained by the server. Everytime a context is added or removed, this number gets incremented.\n",
3400
+ "type": "integer"
3401
+ },
3402
+ "contexts_soft_hash": {
3403
+ "description": "An auto-increment value that reflects the number of changes to the queue that sends contexts updates to Netdata Cloud. Everytime the contents of a context are updated, this number gets incremented.\n",
3404
+ "type": "integer"
3405
+ },
3406
+ "alerts_hard_hash": {
3407
+ "description": "An auto-increment value that reflects the number of changes to the number of alerts. Everytime an alert is added or removed, this number gets incremented.\n",
3408
+ "type": "integer"
3409
+ },
3410
+ "alerts_soft_hash": {
3411
+ "description": "An auto-increment value that reflects the number of alerts transitions. Everytime an alert transitions to a new state, this number gets incremented.\n",
3412
+ "type": "integer"
3413
+ }
3414
+ }
3415
+ },
3416
+ "nodeBasic": {
3417
+ "type": "object",
3418
+ "description": "Basic information about a node.",
3419
+ "required": [
3420
+ "ni",
3421
+ "st"
3422
+ ],
3423
+ "properties": {
3424
+ "mg": {
3425
+ "description": "The machine guid of the node. May not be available if the request is served by the Netdata Cloud.",
3426
+ "type": "string",
3427
+ "format": "UUID"
3428
+ },
3429
+ "nd": {
3430
+ "description": "The node id of the node. May not be available if the node is not registered to Netdata Cloud.",
3431
+ "type": "string",
3432
+ "format": "UUID"
3433
+ },
3434
+ "nm": {
3435
+ "description": "The name (hostname) of the node.",
3436
+ "type": "string"
3437
+ },
3438
+ "ni": {
3439
+ "description": "The node index id, a number that uniquely identifies this node for this query.",
3440
+ "type": "integer"
3441
+ },
3442
+ "st": {
3443
+ "description": "Status information about the communication with this node.",
3444
+ "type": "object",
3445
+ "properties": {
3446
+ "ai": {
3447
+ "description": "The agent index id that has been contacted for this node.",
3448
+ "type": "integer"
3449
+ },
3450
+ "code": {
3451
+ "description": "The HTTP response code of the response for this node. When working directly with an agent, this is always 200. If the `code` is missing, it should be assumed to be 200.",
3452
"type": "integer"
3453
},
3247
- "partial_data_trimming": {
3248
- "description": "Information related to trimming of the last few points of the `result`, that was required to remove (increasing) partial data.\nTrimming is disabled when the `raw` option is given to the query.\n",
3249
- "type": "object",
3250
- "properties": {
3251
- "max_update_every": {
3252
- "description": "The maximum `update_every` for all metrics aggregated into the query.\nTrimming is by default enabled at `view.before - max_update_every`, but only when `view.before >= now - max_update_every`.\n",
3253
- "type": "integer"
3254
- },
3255
- "expected_after": {
3256
- "description": "The timestamp at which trimming can be enabled.\nIf this timestamp is greater or equal to `view.before`, there is no trimming.\n",
3257
- "type": "integer"
3258
- },
3259
- "trimmed_after": {
3260
- "description": "The timestamp at which trimming has been applied.\nIf this timestamp is greater or equal to `view.before`, there is no trimming.\n",
3261
- "type": "integer"
3262
- }
3263
- }
3454
+ "msg": {
3455
+ "description": "A human readable description of the error, if any. If `msg` is missing, or is the empty string `\"\"` or is `null`, there is no description associated with the current status.",
3456
+ "type": "string"
3457
},
3265
- "points": {
3266
- "description": "The number of points in `result`.\n",
3267
- "type": "integer"
3458
+ "ms": {
3459
+ "description": "The time in milliseconds this node took to respond, or if the local agent responded for this node, the time it needed to execute the query. If `ms` is missing, the time that was required to query this node is unknown.",
3460
+ "type": "number"
3461
+ }
3462
+ }
3463
+ }
3464
+ }
3465
+ },
3466
+ "nodeWithDataStatistics": {
3467
+ "allOf": [
3468
+ {
3469
+ "$ref": "#/components/schemas/nodeBasic"
3470
+ },
3471
+ {
3472
+ "type": "object",
3473
+ "description": "`is` stands for instances, `ds` for dimensions, `al` for alerts, `sts` for statistics.\n",
3474
+ "properties": {
3475
+ "is": {
3476
+ "$ref": "#/components/schemas/jsonwrap2_items_count"
3477
},
3269
- "units": {
3270
- "description": "The units of the query.\n",
3478
+ "ds": {
3479
+ "$ref": "#/components/schemas/jsonwrap2_items_count"
3480
+ },
3481
+ "al": {
3482
+ "$ref": "#/components/schemas/jsonwrap2_alerts_count"
3483
+ },
3484
+ "sts": {
3485
"oneOf": [
3486
{
3273
- "type": "string"
3487
+ "$ref": "#/components/schemas/jsonwrap2_sts"
3488
},
3489
{
3276
- "type": "array",
3277
- "items": {
3278
- "type": "string"
3279
- }
3490
+ "$ref": "#/components/schemas/jsonwrap2_sts_raw"
3491
}
3492
]
3282
- },
3283
- "chart_type": {
3284
- "description": "The default chart type of the query.\n",
3285
- "type": "string",
3286
- "enum": [
3287
- "line",
3288
- "area",
3289
- "stacked"
3290
- ]
3291
- },
3292
- "dimensions": {
3293
- "description": "Detailed information about the chart dimensions included in the `result`.\n",
3294
- "type": "object",
3295
- "properties": {
3296
- "grouped_by": {
3297
- "description": "An array with the order of the groupings performed.\n",
3298
- "type": "array",
3299
- "items": {
3300
- "type": "string",
3301
- "enum": [
3302
- "selected",
3303
- "dimension",
3304
- "instance",
3305
- "node",
3306
- "context",
3307
- "units",
3308
- "label:key1",
3309
- "label:key2",
3310
- "label:keyN"
3311
- ]
3312
- }
3313
- },
3314
- "ids": {
3315
- "description": "An array with the dimension ids that uniquely identify the dimensions for this query.\n",
3316
- "type": "array",
3317
- "items": {
3318
- "type": "string"
3319
- }
3320
- },
3321
- "names": {
3322
- "description": "An array with the dimension names to be presented to users. Names may be overlapping, but IDs are not.\n",
3323
- "type": "array",
3324
- "items": {
3325
- "type": "string"
3326
- }
3327
- },
3328
- "units": {
3329
- "description": "An array with the units each dimension has.\n",
3330
- "type": "array",
3331
- "items": {
3332
- "type": "string"
3333
- }
3334
- },
3335
- "priorities": {
3336
- "description": "An array with the relative priorities of the dimensions.\nNumbers may not be sequential or unique. The application is expected to order by this and then by name.\n",
3337
- "type": "array",
3338
- "items": {
3339
- "type": "integer"
3340
- }
3341
- },
3342
- "aggregated": {
3343
- "description": "An array with the number of source metrics aggregated into each dimension.\n",
3344
- "type": "array",
3345
- "items": {
3346
- "type": "integer"
3347
- }
3348
- },
3349
- "view_average_values": {
3350
- "description": "An array of the average value of each dimension across the entire query.\n",
3351
- "type": "array",
3352
- "items": {
3353
- "type": "number"
3354
- }
3355
- },
3356
- "view_latest_values": {
3357
- "description": "An array of the latest value of each dimension, included in this query.\n",
3358
- "type": "array",
3359
- "items": {
3360
- "type": "number"
3361
- }
3362
- },
3363
- "count": {
3364
- "description": "The number of dimensions in the `result`.\n",
3365
- "type": "integer"
3366
- },
3367
- "labels": {
3368
- "description": "The labels associated with each dimension in the query.\nThis object is only available when the `group-by-labels` option is given to the query.\n",
3369
- "type": "object",
3370
- "properties": {
3371
- "label_key1": {
3372
- "description": "An array having one entry for each of the dimensions of the query.\n",
3373
- "type": "array",
3374
- "items": {
3375
- "description": "An array having one entry for each of the values this label key has for the given dimension.\n",
3376
- "type": "array",
3377
- "items": {
3378
- "type": "string"
3379
- }
3380
- }
3381
- }
3382
- }
3383
- }
3384
- }
3385
- },
3386
- "min": {
3387
- "description": "The minimum value of all points included in the `result`.\n",
3388
- "type": "number"
3389
- },
3390
- "max": {
3391
- "description": "The maximum value of all points included in the `result`.\n",
3392
- "type": "number"
3493
}
3494
}
3495
+ }
3496
+ ]
This file is too large to show in full.