@cryptotaxi247 / netdata-1 / commits / 928c52f73

Upgraded the swagger definition to OpenAPI3.0

This fixes the "structural error" messages that were introduced in commit 7b3f17d32425...

Andrew Moss committed Nov 5, 2019 at 18:44 UTC 928c52f73f7f21e6d434bff82b01effedb6010bd
2 files changed +2384 -2059
web/api/netdata-swagger.json
+1260 -1134
@@ -1,19 +1,10 @@
1 {
2 - "swagger": "2.0",
2 + "openapi": "3.0.0",
3 "info": {
4 "title": "NetData API",
5 "description": "Real-time performance and health monitoring.",
6 "version": "1.11.1_rolling"
7 },
8 - "host": "registry.my-netdata.io",
9 - "schemes": [
10 - "https",
11 - "http"
12 - ],
13 - "basePath": "/api/v1",
14 - "produces": [
15 - "application/json"
16 - ],
8 "paths": {
9 "/info": {
10 "get": {
@@ -22,8 +13,12 @@
13 "responses": {
14 "200": {
15 "description": "netdata basic information.",
25 - "schema": {
26 - "$ref": "#/definitions/info"
16 + "content": {
17 + "application/json": {
18 + "schema": {
19 + "$ref": "#/components/schemas/info"
20 + }
21 + }
22 }
23 },
24 "503": {
@@ -39,8 +34,12 @@
34 "responses": {
35 "200": {
36 "description": "An array of charts.",
42 - "schema": {
43 - "$ref": "#/definitions/chart_summary"
37 + "content": {
38 + "application/json": {
39 + "schema": {
40 + "$ref": "#/components/schemas/chart_summary"
41 + }
42 + }
43 }
44 }
45 }
@@ -56,16 +55,22 @@
55 "in": "query",
56 "description": "The id of the chart as returned by the /charts call.",
57 "required": true,
59 - "type": "string",
60 - "format": "as returned by /charts",
61 - "default": "system.cpu"
58 + "schema": {
59 + "type": "string",
60 + "format": "as returned by /charts",
61 + "default": "system.cpu"
62 + }
63 }
64 ],
65 "responses": {
66 "200": {
67 "description": "A javascript object with detailed information about the chart.",
67 - "schema": {
68 - "$ref": "#/definitions/chart"
68 + "content": {
69 + "application/json": {
70 + "schema": {
71 + "$ref": "#/components/schemas/chart"
72 + }
73 + }
74 }
75 },
76 "400": {
@@ -87,16 +92,22 @@
92 "in": "query",
93 "description": "The id of the chart as returned by the /charts call.",
94 "required": true,
90 - "type": "string",
91 - "format": "as returned by /charts",
92 - "default": "system.cpu"
95 + "schema": {
96 + "type": "string",
97 + "format": "as returned by /charts",
98 + "default": "system.cpu"
99 + }
100 }
101 ],
102 "responses": {
103 "200": {
104 "description": "A javascript object with information about the chart and the available variables.",
98 - "schema": {
99 - "$ref": "#/definitions/alarm_variables"
105 + "content": {
106 + "application/json": {
107 + "schema": {
108 + "$ref": "#/components/schemas/alarm_variables"
109 + }
110 + }
111 }
112 },
113 "400": {
@@ -121,170 +132,196 @@
132 "in": "query",
133 "description": "The id of the chart as returned by the /charts call.",
134 "required": true,
124 - "type": "string",
125 - "format": "as returned by /charts",
135 "allowEmptyValue": false,
127 - "default": "system.cpu"
136 + "schema": {
137 + "type": "string",
138 + "format": "as returned by /charts",
139 + "default": "system.cpu"
140 + }
141 },
142 {
143 "name": "dimension",
144 "in": "query",
145 "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.",
146 "required": false,
134 - "type": "array",
135 - "items": {
136 - "type": "string",
137 - "collectionFormat": "pipes",
138 - "format": "as returned by /charts"
139 - },
140 - "allowEmptyValue": false
147 + "allowEmptyValue": false,
148 + "schema": {
149 + "type": "array",
150 + "items": {
151 + "type": "string",
152 + "format": "as returned by /charts"
153 + }
154 + }
155 },
156 {
157 "name": "after",
158 "in": "query",
159 "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). Netdata will adapt this parameter to the boundaries of the round robin database. The default is the beginning of the round robin database (i.e. by default netdata will attempt to return data for the entire database).",
160 "required": true,
147 - "type": "number",
148 - "format": "integer",
161 "allowEmptyValue": false,
150 - "default": -600
162 + "schema": {
163 + "type": "number",
164 + "format": "integer",
165 + "default": -600
166 + }
167 },
168 {
169 "name": "before",
170 "in": "query",
171 "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).",
172 "required": false,
157 - "type": "number",
158 - "format": "integer",
159 - "default": 0
173 + "schema": {
174 + "type": "number",
175 + "format": "integer",
176 + "default": 0
177 + }
178 },
179 {
180 "name": "points",
181 "in": "query",
182 "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.",
183 "required": true,
166 - "type": "number",
167 - "format": "integer",
184 "allowEmptyValue": false,
169 - "default": 20
185 + "schema": {
186 + "type": "number",
187 + "format": "integer",
188 + "default": 20
189 + }
190 },
191 {
192 "name": "group",
193 "in": "query",
194 "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 dimesions to return the most extreme value in either direction).",
195 "required": true,
176 - "type": "string",
177 - "enum": [
178 - "min",
179 - "max",
180 - "average",
181 - "median",
182 - "stddev",
183 - "sum",
184 - "incremental-sum"
185 - ],
186 - "default": "average",
187 - "allowEmptyValue": false
196 + "allowEmptyValue": false,
197 + "schema": {
198 + "type": "string",
199 + "enum": [
200 + "min",
201 + "max",
202 + "average",
203 + "median",
204 + "stddev",
205 + "sum",
206 + "incremental-sum"
207 + ],
208 + "default": "average"
209 + }
210 },
211 {
212 "name": "gtime",
213 "in": "query",
214 "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).",
215 "required": false,
194 - "type": "number",
195 - "format": "integer",
216 "allowEmptyValue": false,
197 - "default": 0
217 + "schema": {
218 + "type": "number",
219 + "format": "integer",
220 + "default": 0
221 + }
222 },
223 {
224 "name": "format",
225 "in": "query",
226 "description": "The format of the data to be returned.",
227 "required": true,
204 - "type": "string",
205 - "enum": [
206 - "json",
207 - "jsonp",
208 - "csv",
209 - "tsv",
210 - "tsv-excel",
211 - "ssv",
212 - "ssvcomma",
213 - "datatable",
214 - "datasource",
215 - "html",
216 - "markdown",
217 - "array",
218 - "csvjsonarray"
219 - ],
220 - "default": "json",
221 - "allowEmptyValue": false
228 + "allowEmptyValue": false,
229 + "schema": {
230 + "type": "string",
231 + "enum": [
232 + "json",
233 + "jsonp",
234 + "csv",
235 + "tsv",
236 + "tsv-excel",
237 + "ssv",
238 + "ssvcomma",
239 + "datatable",
240 + "datasource",
241 + "html",
242 + "markdown",
243 + "array",
244 + "csvjsonarray"
245 + ],
246 + "default": "json"
247 + }
248 },
249 {
250 "name": "options",
251 "in": "query",
252 "description": "Options that affect data generation.",
253 "required": false,
228 - "type": "array",
229 - "items": {
230 - "type": "string",
231 - "enum": [
232 - "nonzero",
233 - "flip",
234 - "jsonwrap",
235 - "min2max",
254 + "allowEmptyValue": false,
255 + "schema": {
256 + "type": "array",
257 + "items": {
258 + "type": "string",
259 + "enum": [
260 + "nonzero",
261 + "flip",
262 + "jsonwrap",
263 + "min2max",
264 + "seconds",
265 + "milliseconds",
266 + "abs",
267 + "absolute",
268 + "absolute-sum",
269 + "null2zero",
270 + "objectrows",
271 + "google_json",
272 + "percentage",
273 + "unaligned",
274 + "match-ids",
275 + "match-names",
276 + "showcustomvars"
277 + ]
278 + },
279 + "default": [
280 "seconds",
237 - "milliseconds",
238 - "abs",
239 - "absolute",
240 - "absolute-sum",
241 - "null2zero",
242 - "objectrows",
243 - "google_json",
244 - "percentage",
245 - "unaligned",
246 - "match-ids",
247 - "match-names",
248 - "showcustomvars"
249 - ],
250 - "collectionFormat": "pipes"
251 - },
252 - "default": [
253 - "seconds",
254 - "jsonwrap"
255 - ],
256 - "allowEmptyValue": false
281 + "jsonwrap"
282 + ]
283 + }
284 },
285 {
286 "name": "callback",
287 "in": "query",
288 "description": "For JSONP responses, the callback function name.",
289 "required": false,
263 - "type": "string",
264 - "allowEmptyValue": true
290 + "allowEmptyValue": true,
291 + "schema": {
292 + "type": "string"
293 + }
294 },
295 {
296 "name": "filename",
297 "in": "query",
269 - "description": "Add Content-Disposition: attachment; filename=<filename> header to the response, that will instruct the browser to save the response with the given filename.",
298 + "description": "Add Content-Disposition: attachment; filename= header to the response, that will instruct the browser to save the response with the given filename.",
299 "required": false,
271 - "type": "string",
272 - "allowEmptyValue": true
300 + "allowEmptyValue": true,
301 + "schema": {
302 + "type": "string"
303 + }
304 },
305 {
306 "name": "tqx",
307 "in": "query",
308 "description": "[Google Visualization API](https://developers.google.com/chart/interactive/docs/dev/implementing_data_source?hl=en) formatted parameter.",
309 "required": false,
279 - "type": "string",
280 - "allowEmptyValue": true
310 + "allowEmptyValue": true,
311 + "schema": {
312 + "type": "string"
313 + }
314 }
315 ],
316 "responses": {
317 "200": {
318 "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.",
286 - "schema": {
287 - "$ref": "#/definitions/data"
319 + "content": {
320 + "application/json": {
321 + "schema": {
322 + "$ref": "#/components/schemas/data"
323 + }
324 + }
325 }
326 },
327 "400": {
@@ -309,156 +346,182 @@
346 "in": "query",
347 "description": "The id of the chart as returned by the /charts call.",
348 "required": true,
312 - "type": "string",
313 - "format": "as returned by /charts",
349 "allowEmptyValue": false,
315 - "default": "system.cpu"
350 + "schema": {
351 + "type": "string",
352 + "format": "as returned by /charts",
353 + "default": "system.cpu"
354 + }
355 },
356 {
357 "name": "alarm",
358 "in": "query",
359 "description": "The name of an alarm linked to the chart.",
360 "required": false,
322 - "type": "string",
323 - "format": "any text",
324 - "allowEmptyValue": true
361 + "allowEmptyValue": true,
362 + "schema": {
363 + "type": "string",
364 + "format": "any text"
365 + }
366 },
367 {
368 "name": "dimension",
369 "in": "query",
370 "description": "Zero, one or more dimension ids, as returned by the /chart call.",
371 "required": false,
331 - "type": "array",
332 - "items": {
333 - "type": "string",
334 - "collectionFormat": "pipes",
335 - "format": "as returned by /charts"
336 - },
337 - "allowEmptyValue": false
372 + "allowEmptyValue": false,
373 + "schema": {
374 + "type": "array",
375 + "items": {
376 + "type": "string",
377 + "format": "as returned by /charts"
378 + }
379 + }
380 },
381 {
382 "name": "after",
383 "in": "query",
384 "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.",
385 "required": true,
344 - "type": "number",
345 - "format": "integer",
386 "allowEmptyValue": false,
347 - "default": -600
387 + "schema": {
388 + "type": "number",
389 + "format": "integer",
390 + "default": -600
391 + }
392 },
393 {
394 "name": "before",
395 "in": "query",
396 "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.",
397 "required": false,
354 - "type": "number",
355 - "format": "integer",
356 - "default": 0
398 + "schema": {
399 + "type": "number",
400 + "format": "integer",
401 + "default": 0
402 + }
403 },
404 {
405 "name": "group",
406 "in": "query",
407 "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 dimesions to return the most extreme value in either direction).",
408 "required": true,
363 - "type": "string",
364 - "enum": [
365 - "min",
366 - "max",
367 - "average",
368 - "median",
369 - "stddev",
370 - "sum",
371 - "incremental-sum"
372 - ],
373 - "default": "average",
374 - "allowEmptyValue": false
409 + "allowEmptyValue": false,
410 + "schema": {
411 + "type": "string",
412 + "enum": [
413 + "min",
414 + "max",
415 + "average",
416 + "median",
417 + "stddev",
418 + "sum",
419 + "incremental-sum"
420 + ],
421 + "default": "average"
422 + }
423 },
424 {
425 "name": "options",
426 "in": "query",
427 "description": "Options that affect data generation.",
428 "required": false,
381 - "type": "array",
382 - "items": {
383 - "type": "string",
384 - "enum": [
385 - "abs",
386 - "absolute",
387 - "display-absolute",
388 - "absolute-sum",
389 - "null2zero",
390 - "percentage",
391 - "unaligned"
392 - ],
393 - "collectionFormat": "pipes"
394 - },
395 - "default": [
396 - "absolute"
397 - ],
398 - "allowEmptyValue": true
429 + "allowEmptyValue": true,
430 + "schema": {
431 + "type": "array",
432 + "items": {
433 + "type": "string",
434 + "enum": [
435 + "abs",
436 + "absolute",
437 + "display-absolute",
438 + "absolute-sum",
439 + "null2zero",
440 + "percentage",
441 + "unaligned"
442 + ]
443 + },
444 + "default": [
445 + "absolute"
446 + ]
447 + }
448 },
449 {
450 "name": "label",
451 "in": "query",
452 "description": "A text to be used as the label.",
453 "required": false,
405 - "type": "string",
406 - "format": "any text",
407 - "allowEmptyValue": true
454 + "allowEmptyValue": true,
455 + "schema": {
456 + "type": "string",
457 + "format": "any text"
458 + }
459 },
460 {
461 "name": "units",
462 "in": "query",
463 "description": "A text to be used as the units.",
464 "required": false,
414 - "type": "string",
415 - "format": "any text",
416 - "allowEmptyValue": true
465 + "allowEmptyValue": true,
466 + "schema": {
467 + "type": "string",
468 + "format": "any text"
469 + }
470 },
471 {
472 "name": "label_color",
473 "in": "query",
474 "description": "A color to be used for the background of the label.",
475 "required": false,
423 - "type": "string",
424 - "format": "any text",
425 - "allowEmptyValue": true
476 + "allowEmptyValue": true,
477 + "schema": {
478 + "type": "string",
479 + "format": "any text"
480 + }
481 },
482 {
483 "name": "value_color",
484 "in": "query",
430 - "description": "A color to be used for the background of the label. You can set multiple using a pipe with a condition each, like this: color<value|color>value|color:null The following operators are supported: >, <, >=, <=, =, :null (to check if no value exists).",
485 + "description": "A color to be used for the background of the label. You can set multiple using a pipe with a condition each, like this: colorvalue|color:null The following operators are supported: >, <, >=, <=, =, :null (to check if no value exists).",
486 "required": false,
432 - "type": "string",
433 - "format": "any text",
434 - "allowEmptyValue": true
487 + "allowEmptyValue": true,
488 + "schema": {
489 + "type": "string",
490 + "format": "any text"
491 + }
492 },
493 {
494 "name": "multiply",
495 "in": "query",
496 "description": "Multiply the value with this number for rendering it at the image (integer value required).",
497 "required": false,
441 - "type": "number",
442 - "format": "integer",
443 - "allowEmptyValue": true
498 + "allowEmptyValue": true,
499 + "schema": {
500 + "type": "number",
501 + "format": "integer"
502 + }
503 },
504 {
505 "name": "divide",
506 "in": "query",
507 "description": "Divide the value with this number for rendering it at the image (integer value required).",
508 "required": false,
450 - "type": "number",
451 - "format": "integer",
452 - "allowEmptyValue": true
509 + "allowEmptyValue": true,
510 + "schema": {
511 + "type": "number",
512 + "format": "integer"
513 + }
514 },
515 {
516 "name": "scale",
517 "in": "query",
518 "description": "Set the scale of the badge (greater or equal to 100).",
519 "required": false,
459 - "type": "number",
460 - "format": "integer",
461 - "allowEmptyValue": true
520 + "allowEmptyValue": true,
521 + "schema": {
522 + "type": "number",
523 + "format": "integer"
524 + }
525 }
526 ],
527 "responses": {
@@ -487,115 +550,135 @@
550 "in": "query",
551 "description": "The format of the response to be returned.",
552 "required": true,
490 - "type": "string",
491 - "enum": [
492 - "shell",
493 - "prometheus",
494 - "prometheus_all_hosts",
495 - "json"
496 - ],
497 - "default": "shell"
553 + "schema": {
554 + "type": "string",
555 + "enum": [
556 + "shell",
557 + "prometheus",
558 + "prometheus_all_hosts",
559 + "json"
560 + ],
561 + "default": "shell"
562 + }
563 },
564 {
565 "name": "help",
566 "in": "query",
567 "description": "Enable or disable HELP lines in prometheus output.",
568 "required": false,
504 - "type": "string",
505 - "enum": [
506 - "yes",
507 - "no"
508 - ],
509 - "default": "no"
569 + "schema": {
570 + "type": "string",
571 + "enum": [
572 + "yes",
573 + "no"
574 + ],
575 + "default": "no"
576 + }
577 },
578 {
579 "name": "types",
580 "in": "query",
581 "description": "Enable or disable TYPE lines in prometheus output.",
582 "required": false,
516 - "type": "string",
517 - "enum": [
518 - "yes",
519 - "no"
520 - ],
521 - "default": "no"
583 + "schema": {
584 + "type": "string",
585 + "enum": [
586 + "yes",
587 + "no"
588 + ],
589 + "default": "no"
590 + }
591 },
592 {
593 "name": "timestamps",
594 "in": "query",
595 "description": "Enable or disable timestamps in prometheus output.",
596 "required": false,
528 - "type": "string",
529 - "enum": [
530 - "yes",
531 - "no"
532 - ],
533 - "default": "yes"
597 + "schema": {
598 + "type": "string",
599 + "enum": [
600 + "yes",
601 + "no"
602 + ],
603 + "default": "yes"
604 + }
605 },
606 {
607 "name": "names",
608 "in": "query",
609 "description": "When enabled netdata will report dimension names. When disabled netdata will report dimension IDs. The default is controlled in netdata.conf.",
610 "required": false,
540 - "type": "string",
541 - "enum": [
542 - "yes",
543 - "no"
544 - ],
545 - "default": "yes"
611 + "schema": {
612 + "type": "string",
613 + "enum": [
614 + "yes",
615 + "no"
616 + ],
617 + "default": "yes"
618 + }
619 },
620 {
621 "name": "oldunits",
622 "in": "query",
623 "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.",
624 "required": false,
552 - "type": "string",
553 - "enum": [
554 - "yes",
555 - "no"
556 - ],
557 - "default": "yes"
625 + "schema": {
626 + "type": "string",
627 + "enum": [
628 + "yes",
629 + "no"
630 + ],
631 + "default": "yes"
632 + }
633 },
634 {
635 "name": "hideunits",
636 "in": "query",
637 "description": "When enabled, netdata will not include the units in the metric names, for the default source=average.",
638 "required": false,
564 - "type": "string",
565 - "enum": [
566 - "yes",
567 - "no"
568 - ],
569 - "default": "yes"
639 + "schema": {
640 + "type": "string",
641 + "enum": [
642 + "yes",
643 + "no"
644 + ],
645 + "default": "yes"
646 + }
647 },
648 {
649 "name": "server",
650 "in": "query",
651 "description": "Set a distinct name of the client querying prometheus metrics. Netdata will use the client IP if this is not set.",
652 "required": false,
576 - "type": "string",
577 - "format": "any text"
653 + "schema": {
654 + "type": "string",
655 + "format": "any text"
656 + }
657 },
658 {
659 "name": "prefix",
660 "in": "query",
661 "description": "Prefix all prometheus metrics with this string.",
662 "required": false,
584 - "type": "string",
585 - "format": "any text"
663 + "schema": {
664 + "type": "string",
665 + "format": "any text"
666 + }
667 },
668 {
669 "name": "data",
670 "in": "query",
671 "description": "Select the prometheus response data source. There is a setting in netdata.conf for the default.",
672 "required": false,
592 - "type": "string",
593 - "enum": [
594 - "as-collected",
595 - "average",
596 - "sum"
597 - ],
598 - "default": "average"
673 + "schema": {
674 + "type": "string",
675 + "enum": [
676 + "as-collected",
677 + "average",
678 + "sum"
679 + ],
680 + "default": "average"
681 + }
682 }
683 ],
684 "responses": {
@@ -618,15 +701,21 @@
701 "in": "query",
702 "description": "If passed, all enabled alarms are returned.",
703 "required": false,
621 - "type": "boolean",
622 - "allowEmptyValue": true
704 + "allowEmptyValue": true,
705 + "schema": {
706 + "type": "boolean"
707 + }
708 }
709 ],
710 "responses": {
711 "200": {
712 "description": "An object containing general info and a linked list of alarms.",
628 - "schema": {
629 - "$ref": "#/definitions/alarms"
713 + "content": {
714 + "application/json": {
715 + "schema": {
716 + "$ref": "#/components/schemas/alarms"
717 + }
718 + }
719 }
720 }
721 }
@@ -642,16 +731,22 @@
731 "in": "query",
732 "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.",
733 "required": false,
645 - "type": "integer"
646 - }
734 + "schema": {
735 + "type": "integer"
736 + }
737 + }
738 ],
739 "responses": {
740 "200": {
741 "description": "An array of alarm log entries.",
651 - "schema": {
652 - "type": "array",
653 - "items": {
654 - "$ref": "#/definitions/alarm_log_entry"
742 + "content": {
743 + "application/json": {
744 + "schema": {
745 + "type": "array",
746 + "items": {
747 + "$ref": "#/components/schemas/alarm_log_entry"
748 + }
749 + }
750 }
751 }
752 }
@@ -669,14 +764,15 @@
764 "description": "Specify context which should be checked.",
765 "required": false,
766 "allowEmptyValue": true,
672 - "type": "array",
673 - "items": {
674 - "type": "string",
675 - "collectionFormat": "pipes"
676 - },
677 - "default": [
678 - "system.cpu"
679 - ]
767 + "schema": {
768 + "type": "array",
769 + "items": {
770 + "type": "string"
771 + },
772 + "default": [
773 + "system.cpu"
774 + ]
775 + }
776 },
777 {
778 "in": "query",
@@ -684,26 +780,32 @@
780 "description": "Specify alarm status to count.",
781 "required": false,
782 "allowEmptyValue": true,
687 - "type": "string",
688 - "enum": [
689 - "REMOVED",
690 - "UNDEFINED",
691 - "UNINITIALIZED",
692 - "CLEAR",
693 - "RAISED",
694 - "WARNING",
695 - "CRITICAL"
696 - ],
697 - "default": "RAISED"
783 + "schema": {
784 + "type": "string",
785 + "enum": [
786 + "REMOVED",
787 + "UNDEFINED",
788 + "UNINITIALIZED",
789 + "CLEAR",
790 + "RAISED",
791 + "WARNING",
792 + "CRITICAL"
793 + ],
794 + "default": "RAISED"
795 + }
796 }
797 ],
798 "responses": {
799 "200": {
800 "description": "An object containing a count of alarms with given status for given contexts.",
703 - "schema": {
704 - "type": "array",
705 - "items": {
706 - "type": "number"
801 + "content": {
802 + "application/json": {
803 + "schema": {
804 + "type": "array",
805 + "items": {
806 + "type": "number"
807 + }
808 + }
809 }
810 }
811 },
@@ -723,45 +825,57 @@
825 "in": "query",
826 "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.",
827 "required": false,
726 - "type": "string",
727 - "enum": [
728 - "DISABLE ALL",
729 - "SILENCE ALL",
730 - "DISABLE",
731 - "SILENCE",
732 - "RESET",
733 - "LIST"
734 - ]
828 + "schema": {
829 + "type": "string",
830 + "enum": [
831 + "DISABLE ALL",
832 + "SILENCE ALL",
833 + "DISABLE",
834 + "SILENCE",
835 + "RESET",
836 + "LIST"
837 + ]
838 + }
839 },
840 {
841 "name": "alarm",
842 "in": "query",
843 "description": "The expression provided will match both `alarm` and `template` names.",
740 - "type": "string"
844 + "schema": {
845 + "type": "string"
846 + }
847 },
848 {
849 "name": "chart",
850 "in": "query",
851 "description": "Chart ids/names, as shown on the dashboard. These will match the `on` entry of a configured `alarm`.",
746 - "type": "string"
852 + "schema": {
853 + "type": "string"
854 + }
855 },
856 {
857 "name": "context",
858 "in": "query",
859 "description": "Chart context, as shown on the dashboard. These will match the `on` entry of a configured `template`.",
752 - "type": "string"
860 + "schema": {
861 + "type": "string"
862 + }
863 },
864 {
865 "name": "hosts",
866 "in": "query",
867 "description": "The hostnames that will need to match.",
758 - "type": "string"
868 + "schema": {
869 + "type": "string"
870 + }
871 },
872 {
873 "name": "families",
874 "in": "query",
875 "description": "The alarm families.",
764 - "type": "string"
876 + "schema": {
877 + "type": "string"
878 + }
879 }
880 ],
881 "responses": {
@@ -775,599 +889,611 @@
889 }
890 }
891 },
778 - "definitions": {
779 - "info": {
780 - "type": "object",
781 - "properties": {
782 - "version": {
783 - "type": "string",
784 - "description": "netdata version of the server.",
785 - "example": "1.11.1_rolling"
786 - },
787 - "uid": {
788 - "type": "string",
789 - "description": "netdata unique id of the server.",
790 - "example": "24e9fe3c-f2ac-11e8-bafc-0242ac110002"
791 - },
792 - "mirrored_hosts": {
793 - "type": "array",
794 - "description": "List of hosts mirrored of the server (include itself).",
795 - "items": {
796 - "type": "string"
892 + "servers": [
893 + {
894 + "url": "https://registry.my-netdata.io/api/v1"
895 + },
896 + {
897 + "url": "http://registry.my-netdata.io/api/v1"
898 + }
899 + ],
900 + "components": {
901 + "schemas": {
902 + "info": {
903 + "type": "object",
904 + "properties": {
905 + "version": {
906 + "type": "string",
907 + "description": "netdata version of the server.",
908 + "example": "1.11.1_rolling"
909 },
798 - "example": [
799 - "host1.example.com",
800 - "host2.example.com"
801 - ]
802 - },
803 - "os_name": {
804 - "type": "string",
805 - "description": "Operating System Name.",
806 - "example": "Manjaro Linux"
807 - },
808 - "os_id": {
809 - "type": "string",
810 - "description": "Operating System ID.",
811 - "example": "manjaro"
812 - },
813 - "os_id_like": {
814 - "type": "string",
815 - "description": "Known OS similar to this OS.",
816 - "example": "arch"
817 - },
818 - "os_version": {
819 - "type": "string",
820 - "description": "Operating System Version.",
821 - "example": "18.0.4"
822 - },
823 - "os_version_id": {
824 - "type": "string",
825 - "description": "Operating System Version ID.",
826 - "example": "unknown"
827 - },
828 - "os_detection": {
829 - "type": "string",
830 - "description": "OS parameters detection method.",
831 - "example": "Mixed"
832 - },
833 - "kernel_name": {
834 - "type": "string",
835 - "description": "Kernel Name.",
836 - "example": "Linux"
837 - },
838 - "kernel_version": {
839 - "type": "string",
840 - "description": "Kernel Version.",
841 - "example": "4.19.32-1-MANJARO"
842 - },
843 - "architecture": {
844 - "type": "string",
845 - "description": "Kernel architecture.",
846 - "example": "x86_64"
847 - },
848 - "virtualization": {
849 - "type": "string",
850 - "description": "Virtualization Type.",
851 - "example": "kvm"
852 - },
853 - "virt_detection": {
854 - "type": "string",
855 - "description": "Virtualization detection method.",
856 - "example": "systemd-detect-virt"
857 - },
858 - "container": {
859 - "type": "string",
860 - "description": "Container technology.",
861 - "example": "docker"
862 - },
863 - "container_detection": {
864 - "type": "string",
865 - "description": "Container technology detection method.",
866 - "example": "dockerenv"
867 - },
868 - "collectors": {
869 - "type": "array",
870 - "items": {
910 + "uid": {
911 + "type": "string",
912 + "description": "netdata unique id of the server.",
913 + "example": "24e9fe3c-f2ac-11e8-bafc-0242ac110002"
914 + },
915 + "mirrored_hosts": {
916 + "type": "array",
917 + "description": "List of hosts mirrored of the server (include itself).",
918 + "items": {
919 + "type": "string"
920 + },
921 + "example": [
922 + "host1.example.com",
923 + "host2.example.com"
924 + ]
925 + },
926 + "os_name": {
927 + "type": "string",
928 + "description": "Operating System Name.",
929 + "example": "Manjaro Linux"
930 + },
931 + "os_id": {
932 + "type": "string",
933 + "description": "Operating System ID.",
934 + "example": "manjaro"
935 + },
936 + "os_id_like": {
937 + "type": "string",
938 + "description": "Known OS similar to this OS.",
939 + "example": "arch"
940 + },
941 + "os_version": {
942 + "type": "string",
943 + "description": "Operating System Version.",
944 + "example": "18.0.4"
945 + },
946 + "os_version_id": {
947 + "type": "string",
948 + "description": "Operating System Version ID.",
949 + "example": "unknown"
950 + },
951 + "os_detection": {
952 + "type": "string",
953 + "description": "OS parameters detection method.",
954 + "example": "Mixed"
955 + },
956 + "kernel_name": {
957 + "type": "string",
958 + "description": "Kernel Name.",
959 + "example": "Linux"
960 + },
961 + "kernel_version": {
962 + "type": "string",
963 + "description": "Kernel Version.",
964 + "example": "4.19.32-1-MANJARO"
965 + },
966 + "architecture": {
967 + "type": "string",
968 + "description": "Kernel architecture.",
969 + "example": "x86_64"
970 + },
971 + "virtualization": {
972 + "type": "string",
973 + "description": "Virtualization Type.",
974 + "example": "kvm"
975 + },
976 + "virt_detection": {
977 + "type": "string",
978 + "description": "Virtualization detection method.",
979 + "example": "systemd-detect-virt"
980 + },
981 + "container": {
982 + "type": "string",
983 + "description": "Container technology.",
984 + "example": "docker"
985 + },
986 + "container_detection": {
987 + "type": "string",
988 + "description": "Container technology detection method.",
989 + "example": "dockerenv"
990 + },
991 + "collectors": {
992 + "type": "array",
993 + "items": {
994 + "type": "object",
995 + "description": "Array of collector plugins and modules.",
996 + "properties": {
997 + "plugin": {
998 + "type": "string",
999 + "description": "Collector plugin.",
1000 + "example": "python.d.plugin"
1001 + },
1002 + "module": {
1003 + "type": "string",
1004 + "description": "Module of the collector plugin.",
1005 + "example": "dockerd"
1006 + }
1007 + }
1008 + }
1009 + },
1010 + "alarms": {
1011 "type": "object",
872 - "description": "Array of collector plugins and modules.",
1012 + "description": "Number of alarms in the server.",
1013 "properties": {
874 - "plugin": {
875 - "type": "string",
876 - "description": "Collector plugin.",
877 - "example": "python.d.plugin"
1014 + "normal": {
1015 + "type": "integer",
1016 + "description": "Number of alarms in normal state."
1017 },
879 - "module": {
880 - "type": "string",
881 - "description": "Module of the collector plugin.",
882 - "example": "dockerd"
1018 + "warning": {
1019 + "type": "integer",
1020 + "description": "Number of alarms in warning state."
1021 + },
1022 + "critical": {
1023 + "type": "integer",
1024 + "description": "Number of alarms in critical state."
1025 }
1026 }
1027 }
886 - },
887 - "alarms": {
888 - "type": "object",
889 - "description": "Number of alarms in the server.",
890 - "properties": {
891 - "normal": {
892 - "type": "integer",
893 - "description": "Number of alarms in normal state."
894 - },
895 - "warning": {
896 - "type": "integer",
897 - "description": "Number of alarms in warning state."
898 - },
899 - "critical": {
900 - "type": "integer",
901 - "description": "Number of alarms in critical state."
902 - }
903 - }
1028 }
905 - }
906 - },
907 - "chart_summary": {
908 - "type": "object",
909 - "properties": {
910 - "hostname": {
911 - "type": "string",
912 - "description": "The hostname of the netdata server."
913 - },
914 - "version": {
915 - "type": "string",
916 - "description": "netdata version of the server."
917 - },
918 - "release_channel": {
919 - "type": "string",
920 - "description": "The release channel of the build on the server.",
921 - "example": "nightly"
922 - },
923 - "timezone": {
924 - "type": "string",
925 - "description": "The current timezone on the server."
926 - },
927 - "os": {
928 - "type": "string",
929 - "description": "The netdata server host operating system.",
930 - "enum": [
931 - "macos",
932 - "linux",
933 - "freebsd"
934 - ]
935 - },
936 - "history": {
937 - "type": "number",
938 - "description": "The duration, in seconds, of the round robin database maintained by netdata."
939 - },
940 - "memory_mode": {
941 - "type": "string",
942 - "description": "The name of the database memory mode on the server."
943 - },
944 - "update_every": {
945 - "type": "number",
946 - "description": "The default update frequency of the netdata server. All charts have an update frequency equal or bigger than this."
947 - },
948 - "charts": {
949 - "type": "object",
950 - "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.",
951 - "properties": {
952 - "$ref": "#/definitions/chart"
1029 + },
1030 + "chart_summary": {
1031 + "type": "object",
1032 + "properties": {
1033 + "hostname": {
1034 + "type": "string",
1035 + "description": "The hostname of the netdata server."
1036 + },
1037 + "version": {
1038 + "type": "string",
1039 + "description": "netdata version of the server."
1040 + },
1041 + "release_channel": {
1042 + "type": "string",
1043 + "description": "The release channel of the build on the server.",
1044 + "example": "nightly"
1045 + },
1046 + "timezone": {
1047 + "type": "string",
1048 + "description": "The current timezone on the server."
1049 + },
1050 + "os": {
1051 + "type": "string",
1052 + "description": "The netdata server host operating system.",
1053 + "enum": [
1054 + "macos",
1055 + "linux",
1056 + "freebsd"
1057 + ]
1058 + },
1059 + "history": {
1060 + "type": "number",
1061 + "description": "The duration, in seconds, of the round robin database maintained by netdata."
1062 + },
1063 + "memory_mode": {
1064 + "type": "string",
1065 + "description": "The name of the database memory mode on the server."
1066 + },
1067 + "update_every": {
1068 + "type": "number",
1069 + "description": "The default update frequency of the netdata server. All charts have an update frequency equal or bigger than this."
1070 + },
1071 + "charts": {
1072 + "type": "object",
1073 + "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.",
1074 + "additionalProperties": {
1075 + "$ref": "#/components/schemas/chart"
1076 + }
1077 + },
1078 + "charts_count": {
1079 + "type": "number",
1080 + "description": "The number of charts."
1081 + },
1082 + "dimensions_count": {
1083 + "type": "number",
1084 + "description": "The total number of dimensions."
1085 + },
1086 + "alarms_count": {
1087 + "type": "number",
1088 + "description": "The number of alarms."
1089 + },
1090 + "rrd_memory_bytes": {
1091 + "type": "number",
1092 + "description": "The size of the round robin database in bytes."
1093 }
954 - },
955 - "charts_count": {
956 - "type": "number",
957 - "description": "The number of charts."
958 - },
959 - "dimensions_count": {
960 - "type": "number",
961 - "description": "The total number of dimensions."
962 - },
963 - "alarms_count": {
964 - "type": "number",
965 - "description": "The number of alarms."
966 - },
967 - "rrd_memory_bytes": {
968 - "type": "number",
969 - "description": "The size of the round robin database in bytes."
1094 }
971 - }
972 - },
973 - "chart": {
974 - "type": "object",
975 - "properties": {
976 - "id": {
977 - "type": "string",
978 - "description": "The unique id of the chart."
979 - },
980 - "name": {
981 - "type": "string",
982 - "description": "The name of the chart."
983 - },
984 - "type": {
985 - "type": "string",
986 - "description": "The type of the chart. Types are not handled by netdata. You can use this field for anything you like."
987 - },
988 - "family": {
989 - "type": "string",
990 - "description": "The family of the chart. Families are not handled by netdata. You can use this field for anything you like."
991 - },
992 - "title": {
993 - "type": "string",
994 - "description": "The title of the chart."
995 - },
996 - "priority": {
997 - "type": "number",
998 - "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."
999 - },
1000 - "enabled": {
1001 - "type": "boolean",
1002 - "description": "True when the chart is enabled. Disabled charts do not currently collect values, but they may have historical values available."
1003 - },
1004 - "units": {
1005 - "type": "string",
1006 - "description": "The unit of measurement for the values of all dimensions of the chart."
1007 - },
1008 - "data_url": {
1009 - "type": "string",
1010 - "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."
1011 - },
1012 - "chart_type": {
1013 - "type": "string",
1014 - "description": "The chart type.",
1015 - "enum": [
1016 - "line",
1017 - "area",
1018 - "stacked"
1019 - ]
1020 - },
1021 - "duration": {
1022 - "type": "number",
1023 - "description": "The duration, in seconds, of the round robin database maintained by netdata."
1024 - },
1025 - "first_entry": {
1026 - "type": "number",
1027 - "description": "The UNIX timestamp of the first entry (the oldest) in the round robin database."
1028 - },
1029 - "last_entry": {
1030 - "type": "number",
1031 - "description": "The UNIX timestamp of the latest entry in the round robin database."
1032 - },
1033 - "update_every": {
1034 - "type": "number",
1035 - "description": "The update frequency of this chart, in seconds. One value every this amount of time is kept in the round robin database."
1036 - },
1037 - "dimensions": {
1038 - "type": "object",
1039 - "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.",
1040 - "additionalProperties" : {
1041 - "type" : "object",
1042 - "properties" : {
1043 - "name" : {
1044 - "type" : "string",
1045 - "description" : "The name of the dimension"
1095 + },
1096 + "chart": {
1097 + "type": "object",
1098 + "properties": {
1099 + "id": {
1100 + "type": "string",
1101 + "description": "The unique id of the chart."
1102 + },
1103 + "name": {
1104 + "type": "string",
1105 + "description": "The name of the chart."
1106 + },
1107 + "type": {
1108 + "type": "string",
1109 + "description": "The type of the chart. Types are not handled by netdata. You can use this field for anything you like."
1110 + },
1111 + "family": {
1112 + "type": "string",
1113 + "description": "The family of the chart. Families are not handled by netdata. You can use this field for anything you like."
1114 + },
1115 + "title": {
1116 + "type": "string",
1117 + "description": "The title of the chart."
1118 + },
1119 + "priority": {
1120 + "type": "number",
1121 + "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."
1122 + },
1123 + "enabled": {
1124 + "type": "boolean",
1125 + "description": "True when the chart is enabled. Disabled charts do not currently collect values, but they may have historical values available."
1126 + },
1127 + "units": {
1128 + "type": "string",
1129 + "description": "The unit of measurement for the values of all dimensions of the chart."
1130 + },
1131 + "data_url": {
1132 + "type": "string",
1133 + "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."
1134 + },
1135 + "chart_type": {
1136 + "type": "string",
1137 + "description": "The chart type.",
1138 + "enum": [
1139 + "line",
1140 + "area",
1141 + "stacked"
1142 + ]
1143 + },
1144 + "duration": {
1145 + "type": "number",
1146 + "description": "The duration, in seconds, of the round robin database maintained by netdata."
1147 + },
1148 + "first_entry": {
1149 + "type": "number",
1150 + "description": "The UNIX timestamp of the first entry (the oldest) in the round robin database."
1151 + },
1152 + "last_entry": {
1153 + "type": "number",
1154 + "description": "The UNIX timestamp of the latest entry in the round robin database."
1155 + },
1156 + "update_every": {
1157 + "type": "number",
1158 + "description": "The update frequency of this chart, in seconds. One value every this amount of time is kept in the round robin database."
1159 + },
1160 + "dimensions": {
1161 + "type": "object",
1162 + "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.",
1163 + "additionalProperties": {
1164 + "type": "object",
1165 + "properties": {
1166 + "name": {
1167 + "type": "string",
1168 + "description": "The name of the dimension"
1169 + }
1170 }
1171 }
1048 - }
1049 - },
1050 - "chart_variables": {
1051 - "type": "object",
1052 - "properties": {
1053 - "$ref": "#/definitions/chart_variables"
1054 - }
1055 - },
1056 - "green": {
1057 - "type": "number",
1058 - "nullable": "true",
1059 - "description": "Chart health green threshold."
1060 - },
1061 - "red": {
1062 - "type": "number",
1063 - "nullable": "true",
1064 - "description": "Chart health red threshold."
1065 - }
1066 - }
1067 - },
1068 - "alarm_variables": {
1069 - "type": "object",
1070 - "properties": {
1071 - "chart": {
1072 - "type": "string",
1073 - "description": "The unique id of the chart."
1074 - },
1075 - "chart_name": {
1076 - "type": "string",
1077 - "description": "The name of the chart."
1078 - },
1079 - "cnart_context": {
1080 - "type": "string",
1081 - "description": "The context of the chart. It is shared across multiple monitored software or hardware instances and used in alarm templates."
1082 - },
1083 - "family": {
1084 - "type": "string",
1085 - "description": "The family of the chart."
1086 - },
1087 - "host": {
1088 - "type": "string",
1089 - "description": "The host containing the chart."
1090 - },
1091 - "chart_variables": {
1092 - "type": "object",
1093 - "properties": {
1094 - "$ref": "#/definitions/chart_variables"
1095 - }
1096 - },
1097 - "family_variables": {
1098 - "type": "object",
1099 - "properties": {
1100 - "varname1": {
1101 - "type": "number",
1102 - "format": "float"
1103 - },
1104 - "varname2": {
1105 - "type": "number",
1106 - "format": "float"
1172 + },
1173 + "chart_variables": {
1174 + "type": "object",
1175 + "additionalProperties": {
1176 + "$ref": "#/components/schemas/chart_variables"
1177 }
1178 + },
1179 + "green": {
1180 + "type": "number",
1181 + "nullable": true,
1182 + "description": "Chart health green threshold."
1183 + },
1184 + "red": {
1185 + "type": "number",
1186 + "nullable": true,
1187 + "description": "Chart health red threshold."
1188 }
1109 - },
1110 - "host_variables": {
1111 - "type": "object",
1112 - "properties": {
1113 - "varname1": {
1114 - "type": "number",
1115 - "format": "float"
1116 - },
1117 - "varname2": {
1118 - "type": "number",
1119 - "format": "float"
1189 + }
1190 + },
1191 + "alarm_variables": {
1192 + "type": "object",
1193 + "properties": {
1194 + "chart": {
1195 + "type": "string",
1196 + "description": "The unique id of the chart."
1197 + },
1198 + "chart_name": {
1199 + "type": "string",
1200 + "description": "The name of the chart."
1201 + },
1202 + "cnart_context": {
1203 + "type": "string",
1204 + "description": "The context of the chart. It is shared across multiple monitored software or hardware instances and used in alarm templates."
1205 + },
1206 + "family": {
1207 + "type": "string",
1208 + "description": "The family of the chart."
1209 + },
1210 + "host": {
1211 + "type": "string",
1212 + "description": "The host containing the chart."
1213 + },
1214 + "chart_variables": {
1215 + "type": "object",
1216 + "additionalProperties": {
1217 + "$ref": "#/components/schemas/chart_variables"
1218 + }
1219 + },
1220 + "family_variables": {
1221 + "type": "object",
1222 + "properties": {
1223 + "varname1": {
1224 + "type": "number",
1225 + "format": "float"
1226 + },
1227 + "varname2": {
1228 + "type": "number",
1229 + "format": "float"
1230 + }
1231 + }
1232 + },
1233 + "host_variables": {
1234 + "type": "object",
1235 + "properties": {
1236 + "varname1": {
1237 + "type": "number",
1238 + "format": "float"
1239 + },
1240 + "varname2": {
1241 + "type": "number",
1242 + "format": "float"
1243 + }
1244 }
1245 }
1246 }
1123 - }
1124 - },
1125 - "chart_variables": {
1126 - "type": "object",
1127 - "properties": {
1128 - "varname1": {
1129 - "type": "number",
1130 - "format": "float"
1131 - },
1132 - "varname2": {
1133 - "type": "number",
1134 - "format": "float"
1135 - }
1136 - }
1137 - },
1138 - "data": {
1139 - "type": "object",
1140 - "discriminator": "format",
1141 - "description": "Response will contain the appropriate subtype, e.g. data_json depending on the requested format.",
1142 - "properties": {
1143 - "api": {
1144 - "type": "number",
1145 - "description": "The API version this conforms to, currently 1."
1146 - },
1147 - "id": {
1148 - "type": "string",
1149 - "description": "The unique id of the chart."
1150 - },
1151 - "name": {
1152 - "type": "string",
1153 - "description": "The name of the chart."
1154 - },
1155 - "update_every": {
1156 - "type": "number",
1157 - "description": "The update frequency of this chart, in seconds. One value every this amount of time is kept in the round robin database (indepedently of the current view)."
1158 - },
1159 - "view_update_every": {
1160 - "type": "number",
1161 - "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."
1162 - },
1163 - "first_entry": {
1164 - "type": "number",
1165 - "description": "The UNIX timestamp of the first entry (the oldest) in the round robin database (indepedently of the current view)."
1166 - },
1167 - "last_entry": {
1168 - "type": "number",
1169 - "description": "The UNIX timestamp of the latest entry in the round robin database (indepedently of the current view)."
1170 - },
1171 - "after": {
1172 - "type": "number",
1173 - "description": "The UNIX timestamp of the first entry (the oldest) returned in this response."
1174 - },
1175 - "before": {
1176 - "type": "number",
1177 - "description": "The UNIX timestamp of the latest entry returned in this response."
1178 - },
1179 - "min": {
1180 - "type": "number",
1181 - "description": "The minimum value returned in the current view. This can be used to size the y-series of the chart."
1182 - },
1183 - "max": {
1184 - "type": "number",
1185 - "description": "The maximum value returned in the current view. This can be used to size the y-series of the chart."
1186 - },
1187 - "dimension_names": {
1188 - "description": "The dimension names of the chart as returned in the current view.",
1189 - "type": "array",
1190 - "items": {
1191 - "type": "string"
1192 - }
1193 - },
1194 - "dimension_ids": {
1195 - "description": "The dimension IDs of the chart as returned in the current view.",
1196 - "type": "array",
1197 - "items": {
1198 - "type": "string"
1199 - }
1200 - },
1201 - "latest_values": {
1202 - "description": "The latest values collected for the chart (indepedently of the current view).",
1203 - "type": "array",
1204 - "items": {
1205 - "type": "string"
1206 - }
1207 - },
1208 - "view_latest_values": {
1209 - "description": "The latest values returned with this response.",
1210 - "type": "array",
1211 - "items": {
1212 - "type": "string"
1247 + },
1248 + "chart_variables": {
1249 + "type": "object",
1250 + "properties": {
1251 + "varname1": {
1252 + "type": "number",
1253 + "format": "float"
1254 + },
1255 + "varname2": {
1256 + "type": "number",
1257 + "format": "float"
1258 }
1214 - },
1215 - "dimensions": {
1216 - "type": "number",
1217 - "description": "The number of dimensions returned."
1218 - },
1219 - "points": {
1220 - "type": "number",
1221 - "description": "The number of rows / points returned."
1222 - },
1223 - "format": {
1224 - "type": "string",
1225 - "description": "The format of the result returned."
1226 - },
1227 - "chart_variables": {
1228 - "type": "object",
1229 - "properties": {
1230 - "$ref": "#/definitions/chart_variables"
1259 + }
1260 + },
1261 + "data": {
1262 + "type": "object",
1263 + "discriminator": {
1264 + "propertyName": "format"
1265 + },
1266 + "description": "Response will contain the appropriate subtype, e.g. data_json depending on the requested format.",
1267 + "properties": {
1268 + "api": {
1269 + "type": "number",
1270 + "description": "The API version this conforms to, currently 1."
1271 + },
1272 + "id": {
1273 + "type": "string",
1274 + "description": "The unique id of the chart."
1275 + },
1276 + "name": {
1277 + "type": "string",
1278 + "description": "The name of the chart."
1279 + },
1280 + "update_every": {
1281 + "type": "number",
1282 + "description": "The update frequency of this chart, in seconds. One value every this amount of time is kept in the round robin database (indepedently of the current view)."
1283 + },
1284 + "view_update_every": {
1285 + "type": "number",
1286 + "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."
1287 + },
1288 + "first_entry": {
1289 + "type": "number",
1290 + "description": "The UNIX timestamp of the first entry (the oldest) in the round robin database (indepedently of the current view)."
1291 + },
1292 + "last_entry": {
1293 + "type": "number",
1294 + "description": "The UNIX timestamp of the latest entry in the round robin database (indepedently of the current view)."
1295 + },
1296 + "after": {
1297 + "type": "number",
1298 + "description": "The UNIX timestamp of the first entry (the oldest) returned in this response."
1299 + },
1300 + "before": {
1301 + "type": "number",
1302 + "description": "The UNIX timestamp of the latest entry returned in this response."
1303 + },
1304 + "min": {
1305 + "type": "number",
1306 + "description": "The minimum value returned in the current view. This can be used to size the y-series of the chart."
1307 + },
1308 + "max": {
1309 + "type": "number",
1310 + "description": "The maximum value returned in the current view. This can be used to size the y-series of the chart."
1311 + },
1312 + "dimension_names": {
1313 + "description": "The dimension names of the chart as returned in the current view.",
1314 + "type": "array",
1315 + "items": {
1316 + "type": "string"
1317 + }
1318 + },
1319 + "dimension_ids": {
1320 + "description": "The dimension IDs of the chart as returned in the current view.",
1321 + "type": "array",
1322 + "items": {
1323 + "type": "string"
1324 + }
1325 + },
1326 + "latest_values": {
1327 + "description": "The latest values collected for the chart (indepedently of the current view).",
1328 + "type": "array",
1329 + "items": {
1330 + "type": "string"
1331 + }
1332 + },
1333 + "view_latest_values": {
1334 + "description": "The latest values returned with this response.",
1335 + "type": "array",
1336 + "items": {
1337 + "type": "string"
1338 + }
1339 + },
1340 + "dimensions": {
1341 + "type": "number",
1342 + "description": "The number of dimensions returned."
1343 + },
1344 + "points": {
1345 + "type": "number",
1346 + "description": "The number of rows / points returned."
1347 + },
1348 + "format": {
1349 + "type": "string",
1350 + "description": "The format of the result returned."
1351 + },
1352 + "chart_variables": {
1353 + "type": "object",
1354 + "additionalProperties": {
1355 + "$ref": "#/components/schemas/chart_variables"
1356 + }
1357 }
1358 }
1233 - }
1234 - },
1235 - "data_json": {
1236 - "description": "Data response in json format.",
1237 - "allOf": [
1238 - {
1239 - "$ref": "#/definitions/data"
1240 - },
1241 - {
1242 - "properties": {
1243 - "result": {
1244 - "type": "object",
1245 - "properties": {
1246 - "labels": {
1247 - "description": "The dimensions retrieved from the chart.",
1248 - "type": "array",
1249 - "items": {
1250 - "type": "string"
1359 + },
1360 + "data_json": {
1361 + "description": "Data response in json format.",
1362 + "allOf": [
1363 + {
1364 + "$ref": "#/components/schemas/data"
1365 + },
1366 + {
1367 + "properties": {
1368 + "result": {
1369 + "type": "object",
1370 + "properties": {
1371 + "labels": {
1372 + "description": "The dimensions retrieved from the chart.",
1373 + "type": "array",
1374 + "items": {
1375 + "type": "string"
1376 + }
1377 + },
1378 + "data": {
1379 + "description": "The data requested, one element per sample with each element containing the values of the dimensions described in the labels value.",
1380 + "type": "array",
1381 + "items": {
1382 + "type": "number"
1383 + }
1384 }
1385 },
1253 - "data": {
1254 - "description": "The data requested, one element per sample with each element containing the values of the dimensions described in the labels value.",
1255 - "type": "array",
1256 - "items": {
1257 - "type": "number"
1258 - }
1259 - }
1260 - },
1261 - "description": "The result requested, in the format requested."
1386 + "description": "The result requested, in the format requested."
1387 + }
1388 }
1389 }
1264 - }
1265 - ]
1266 - },
1267 - "data_flat": {
1268 - "description": "Data response in csv / tsv / tsv-excel / ssv / ssv-comma / markdown / html formats.",
1269 - "allOf": [
1270 - {
1271 - "$ref": "#/definitions/data"
1272 - },
1273 - {
1274 - "properties": {
1275 - "result": {
1276 - "type": "string"
1390 + ]
1391 + },
1392 + "data_flat": {
1393 + "description": "Data response in csv / tsv / tsv-excel / ssv / ssv-comma / markdown / html formats.",
1394 + "allOf": [
1395 + {
1396 + "$ref": "#/components/schemas/data"
1397 + },
1398 + {
1399 + "properties": {
1400 + "result": {
1401 + "type": "string"
1402 + }
1403 }
1404 }
1279 - }
1280 - ]
1281 - },
1282 - "data_array": {
1283 - "description": "Data response in array format.",
1284 - "allOf": [
1285 - {
1286 - "$ref": "#/definitions/data"
1287 - },
1288 - {
1289 - "properties": {
1290 - "result": {
1291 - "type": "array",
1292 - "items": {
1293 - "type": "number"
1405 + ]
1406 + },
1407 + "data_array": {
1408 + "description": "Data response in array format.",
1409 + "allOf": [
1410 + {
1411 + "$ref": "#/components/schemas/data"
1412 + },
1413 + {
1414 + "properties": {
1415 + "result": {
1416 + "type": "array",
1417 + "items": {
1418 + "type": "number"
1419 + }
1420 }
1421 }
1422 }
1297 - }
1298 - ]
1299 - },
1300 - "data_csvjsonarray": {
1301 - "description": "Data response in csvjsonarray format.",
1302 - "allOf": [
1303 - {
1304 - "$ref": "#/definitions/data"
1305 - },
1306 - {
1307 - "properties": {
1308 - "result": {
1309 - "description": "The first inner array contains strings showing the labels of each column, each subsequent array contains the values for each point in time.",
1310 - "type": "array",
1311 - "items": {
1423 + ]
1424 + },
1425 + "data_csvjsonarray": {
1426 + "description": "Data response in csvjsonarray format.",
1427 + "allOf": [
1428 + {
1429 + "$ref": "#/components/schemas/data"
1430 + },
1431 + {
1432 + "properties": {
1433 + "result": {
1434 + "description": "The first inner array contains strings showing the labels of each column, each subsequent array contains the values for each point in time.",
1435 "type": "array",
1313 - "items": {}
1436 + "items": {
1437 + "type": "array",
1438 + "items": {}
1439 + }
1440 }
1441 }
1442 }
1317 - }
1318 - ]
1319 - },
1320 - "data_datatable": {
1321 - "description": "Data response in datatable / datasource formats (suitable for Google Charts).",
1322 - "allOf": [
1323 - {
1324 - "$ref": "#/definitions/data"
1325 - },
1326 - {
1327 - "properties": {
1328 - "result": {
1329 - "type": "object",
1330 - "properties": {
1331 - "cols": {
1332 - "type": "array",
1333 - "items": {
1334 - "type": "object",
1335 - "properties": {
1336 - "id": {
1337 - "description": "Always empty - for future use."
1338 - },
1339 - "label": {
1340 - "description": "The dimension returned from the chart."
1341 - },
1342 - "pattern": {
1343 - "description": "Always empty - for future use."
1344 - },
1345 - "type": {
1346 - "description": "The type of data in the column / chart-dimension."
1443 + ]
1444 + },
1445 + "data_datatable": {
1446 + "description": "Data response in datatable / datasource formats (suitable for Google Charts).",
1447 + "allOf": [
1448 + {
1449 + "$ref": "#/components/schemas/data"
1450 + },
1451 + {
1452 + "properties": {
1453 + "result": {
1454 + "type": "object",
1455 + "properties": {
1456 + "cols": {
1457 + "type": "array",
1458 + "items": {
1459 + "type": "object",
1460 + "properties": {
1461 + "id": {
1462 + "description": "Always empty - for future use."
1463 + },
1464 + "label": {
1465 + "description": "The dimension returned from the chart."
1466 + },
1467 + "pattern": {
1468 + "description": "Always empty - for future use."
1469 + },
1470 + "type": {
1471 + "description": "The type of data in the column / chart-dimension."
1472 + },
1473 + "p": {
1474 + "description": "Contains any annotations for the column."
1475 + }
1476 },
1348 - "p": {
1349 - "description": "Contains any annotations for the column."
1350 - }
1351 - },
1352 - "required": [
1353 - "id",
1354 - "label",
1355 - "pattern",
1356 - "type"
1357 - ]
1358 - }
1359 - },
1360 - "rows": {
1361 - "type": "array",
1362 - "items": {
1363 - "type": "object",
1364 - "properties": {
1365 - "c": {
1366 - "type": "array",
1367 - "items": {
1368 - "properties": {
1369 - "v": {
1370 - "description": "Each value in the row is represented by an object named `c` with five v fields: data, null, null, 0, the value. This format is fixed by the Google Charts API."
1477 + "required": [
1478 + "id",
1479 + "label",
1480 + "pattern",
1481 + "type"
1482 + ]
1483 + }
1484 + },
1485 + "rows": {
1486 + "type": "array",
1487 + "items": {
1488 + "type": "object",
1489 + "properties": {
1490 + "c": {
1491 + "type": "array",
1492 + "items": {
1493 + "properties": {
1494 + "v": {
1495 + "description": "Each value in the row is represented by an object named `c` with five v fields: data, null, null, 0, the value. This format is fixed by the Google Charts API."
1496 + }
1497 }
1498 }
1499 }
@@ -1378,301 +1504,301 @@
1504 }
1505 }
1506 }
1381 - }
1382 - ]
1383 - },
1384 - "alarms": {
1385 - "type": "object",
1386 - "properties": {
1387 - "hostname": {
1388 - "type": "string"
1389 - },
1390 - "latest_alarm_log_unique_id": {
1391 - "type": "integer",
1392 - "format": "int32"
1393 - },
1394 - "status": {
1395 - "type": "boolean"
1396 - },
1397 - "now": {
1398 - "type": "integer",
1399 - "format": "int32"
1400 - },
1401 - "alarms": {
1402 - "type": "object",
1403 - "properties": {
1404 - "chart-name.alarm-name": {
1405 - "type": "object",
1406 - "properties": {
1407 - "id": {
1408 - "type": "integer",
1409 - "format": "int32"
1410 - },
1411 - "name": {
1412 - "type": "string",
1413 - "description": "Full alarm name."
1414 - },
1415 - "chart": {
1416 - "type": "string"
1417 - },
1418 - "family": {
1419 - "type": "string"
1420 - },
1421 - "active": {
1422 - "type": "boolean",
1423 - "description": "Will be false only if the alarm is disabled in the configuration."
1424 - },
1425 - "disabled": {
1426 - "type": "boolean",
1427 - "description": "Whether the health check for this alarm has been disabled via a health command API DISABLE command."
1428 - },
1429 - "silenced": {
1430 - "type": "boolean",
1431 - "description": "Whether notifications for this alarm have been silenced via a health command API SILENCE command."
1432 - },
1433 - "exec": {
1434 - "type": "string"
1435 - },
1436 - "recipient": {
1437 - "type": "string"
1438 - },
1439 - "source": {
1440 - "type": "string"
1441 - },
1442 - "units": {
1443 - "type": "string"
1444 - },
1445 - "info": {
1446 - "type": "string"
1447 - },
1448 - "status": {
1449 - "type": "string"
1450 - },
1451 - "last_status_change": {
1452 - "type": "integer",
1453 - "format": "int32"
1454 - },
1455 - "last_updated": {
1456 - "type": "integer",
1457 - "format": "int32"
1458 - },
1459 - "next_update": {
1460 - "type": "integer",
1461 - "format": "int32"
1462 - },
1463 - "update_every": {
1464 - "type": "integer",
1465 - "format": "int32"
1466 - },
1467 - "delay_up_duration": {
1468 - "type": "integer",
1469 - "format": "int32"
1470 - },
1471 - "delay_down_duration": {
1472 - "type": "integer",
1473 - "format": "int32"
1474 - },
1475 - "delay_max_duration": {
1476 - "type": "integer",
1477 - "format": "int32"
1478 - },
1479 - "delay_multiplier": {
1480 - "type": "integer",
1481 - "format": "int32"
1482 - },
1483 - "delay": {
1484 - "type": "integer",
1485 - "format": "int32"
1486 - },
1487 - "delay_up_to_timestamp": {
1488 - "type": "integer",
1489 - "format": "int32"
1490 - },
1491 - "value_string": {
1492 - "type": "string"
1493 - },
1494 - "no_clear_notification": {
1495 - "type": "boolean"
1496 - },
1497 - "lookup_dimensions": {
1498 - "type": "string"
1499 - },
1500 - "db_after": {
1501 - "type": "integer",
1502 - "format": "int32"
1503 - },
1504 - "db_before": {
1505 - "type": "integer",
1506 - "format": "int32"
1507 - },
1508 - "lookup_method": {
1509 - "type": "string"
1510 - },
1511 - "lookup_after": {
1512 - "type": "integer",
1513 - "format": "int32"
1514 - },
1515 - "lookup_before": {
1516 - "type": "integer",
1517 - "format": "int32"
1518 - },
1519 - "lookup_options": {
1520 - "type": "string"
1521 - },
1522 - "calc": {
1523 - "type": "string"
1524 - },
1525 - "calc_parsed": {
1526 - "type": "string"
1527 - },
1528 - "warn": {
1529 - "type": "string"
1530 - },
1531 - "warn_parsed": {
1532 - "type": "string"
1533 - },
1534 - "crit": {
1535 - "type": "string"
1536 - },
1537 - "crit_parsed": {
1538 - "type": "string"
1539 - },
1540 - "warn_repeat_every": {
1541 - "type": "integer",
1542 - "format": "int32"
1543 - },
1544 - "crit_repeat_every": {
1545 - "type": "integer",
1546 - "format": "int32"
1547 - },
1548 - "green": {
1549 - "type": "string",
1550 - "format": "nullable"
1551 - },
1552 - "red": {
1553 - "type": "string",
1554 - "format": "nullable"
1555 - },
1556 - "value": {
1557 - "type": "number"
1507 + ]
1508 + },
1509 + "alarms": {
1510 + "type": "object",
1511 + "properties": {
1512 + "hostname": {
1513 + "type": "string"
1514 + },
1515 + "latest_alarm_log_unique_id": {
1516 + "type": "integer",
1517 + "format": "int32"
1518 + },
1519 + "status": {
1520 + "type": "boolean"
1521 + },
1522 + "now": {
1523 + "type": "integer",
1524 + "format": "int32"
1525 + },
1526 + "alarms": {
1527 + "type": "object",
1528 + "properties": {
1529 + "chart-name.alarm-name": {
1530 + "type": "object",
1531 + "properties": {
1532 + "id": {
1533 + "type": "integer",
1534 + "format": "int32"
1535 + },
1536 + "name": {
1537 + "type": "string",
1538 + "description": "Full alarm name."
1539 + },
1540 + "chart": {
1541 + "type": "string"
1542 + },
1543 + "family": {
1544 + "type": "string"
1545 + },
1546 + "active": {
1547 + "type": "boolean",
1548 + "description": "Will be false only if the alarm is disabled in the configuration."
1549 + },
1550 + "disabled": {
1551 + "type": "boolean",
1552 + "description": "Whether the health check for this alarm has been disabled via a health command API DISABLE command."
1553 + },
1554 + "silenced": {
1555 + "type": "boolean",
1556 + "description": "Whether notifications for this alarm have been silenced via a health command API SILENCE command."
1557 + },
1558 + "exec": {
1559 + "type": "string"
1560 + },
1561 + "recipient": {
1562 + "type": "string"
1563 + },
1564 + "source": {
1565 + "type": "string"
1566 + },
1567 + "units": {
1568 + "type": "string"
1569 + },
1570 + "info": {
1571 + "type": "string"
1572 + },
1573 + "status": {
1574 + "type": "string"
1575 + },
1576 + "last_status_change": {
1577 + "type": "integer",
1578 + "format": "int32"
1579 + },
1580 + "last_updated": {
1581 + "type": "integer",
1582 + "format": "int32"
1583 + },
1584 + "next_update": {
1585 + "type": "integer",
1586 + "format": "int32"
1587 + },
1588 + "update_every": {
1589 + "type": "integer",
1590 + "format": "int32"
1591 + },
1592 + "delay_up_duration": {
1593 + "type": "integer",
1594 + "format": "int32"
1595 + },
1596 + "delay_down_duration": {
1597 + "type": "integer",
1598 + "format": "int32"
1599 + },
1600 + "delay_max_duration": {
1601 + "type": "integer",
1602 + "format": "int32"
1603 + },
1604 + "delay_multiplier": {
1605 + "type": "integer",
1606 + "format": "int32"
1607 + },
1608 + "delay": {
1609 + "type": "integer",
1610 + "format": "int32"
1611 + },
1612 + "delay_up_to_timestamp": {
1613 + "type": "integer",
1614 + "format": "int32"
1615 + },
1616 + "value_string": {
1617 + "type": "string"
1618 + },
1619 + "no_clear_notification": {
1620 + "type": "boolean"
1621 + },
1622 + "lookup_dimensions": {
1623 + "type": "string"
1624 + },
1625 + "db_after": {
1626 + "type": "integer",
1627 + "format": "int32"
1628 + },
1629 + "db_before": {
1630 + "type": "integer",
1631 + "format": "int32"
1632 + },
1633 + "lookup_method": {
1634 + "type": "string"
1635 + },
1636 + "lookup_after": {
1637 + "type": "integer",
1638 + "format": "int32"
1639 + },
1640 + "lookup_before": {
1641 + "type": "integer",
1642 + "format": "int32"
1643 + },
1644 + "lookup_options": {
1645 + "type": "string"
1646 + },
1647 + "calc": {
1648 + "type": "string"
1649 + },
1650 + "calc_parsed": {
1651 + "type": "string"
1652 + },
1653 + "warn": {
1654 + "type": "string"
1655 + },
1656 + "warn_parsed": {
1657 + "type": "string"
1658 + },
1659 + "crit": {
1660 + "type": "string"
1661 + },
1662 + "crit_parsed": {
1663 + "type": "string"
1664 + },
1665 + "warn_repeat_every": {
1666 + "type": "integer",
1667 + "format": "int32"
1668 + },
1669 + "crit_repeat_every": {
1670 + "type": "integer",
1671 + "format": "int32"
1672 + },
1673 + "green": {
1674 + "type": "string",
1675 + "format": "nullable"
1676 + },
1677 + "red": {
1678 + "type": "string",
1679 + "format": "nullable"
1680 + },
1681 + "value": {
1682 + "type": "number"
1683 + }
1684 }
1685 }
1686 }
1687 }
1688 }
1563 - }
1564 - },
1565 - "alarm_log_entry": {
1566 - "type": "object",
1567 - "properties": {
1568 - "hostname": {
1569 - "type": "string"
1570 - },
1571 - "unique_id": {
1572 - "type": "integer",
1573 - "format": "int32"
1574 - },
1575 - "alarm_id": {
1576 - "type": "integer",
1577 - "format": "int32"
1578 - },
1579 - "alarm_event_id": {
1580 - "type": "integer",
1581 - "format": "int32"
1582 - },
1583 - "name": {
1584 - "type": "string"
1585 - },
1586 - "chart": {
1587 - "type": "string"
1588 - },
1589 - "family": {
1590 - "type": "string"
1591 - },
1592 - "processed": {
1593 - "type": "boolean"
1594 - },
1595 - "updated": {
1596 - "type": "boolean"
1597 - },
1598 - "exec_run": {
1599 - "type": "integer",
1600 - "format": "int32"
1601 - },
1602 - "exec_failed": {
1603 - "type": "boolean"
1604 - },
1605 - "exec": {
1606 - "type": "string"
1607 - },
1608 - "recipient": {
1609 - "type": "string"
1610 - },
1611 - "exec_code": {
1612 - "type": "integer",
1613 - "format": "int32"
1614 - },
1615 - "source": {
1616 - "type": "string"
1617 - },
1618 - "units": {
1619 - "type": "string"
1620 - },
1621 - "when": {
1622 - "type": "integer",
1623 - "format": "int32"
1624 - },
1625 - "duration": {
1626 - "type": "integer",
1627 - "format": "int32"
1628 - },
1629 - "non_clear_duration": {
1630 - "type": "integer",
1631 - "format": "int32"
1632 - },
1633 - "status": {
1634 - "type": "string"
1635 - },
1636 - "old_status": {
1637 - "type": "string"
1638 - },
1639 - "delay": {
1640 - "type": "integer",
1641 - "format": "int32"
1642 - },
1643 - "delay_up_to_timestamp": {
1644 - "type": "integer",
1645 - "format": "int32"
1646 - },
1647 - "updated_by_id": {
1648 - "type": "integer",
1649 - "format": "int32"
1650 - },
1651 - "updates_id": {
1652 - "type": "integer",
1653 - "format": "int32"
1654 - },
1655 - "value_string": {
1656 - "type": "string"
1657 - },
1658 - "old_value_string": {
1659 - "type": "string"
1660 - },
1661 - "silenced": {
1662 - "type": "string"
1663 - },
1664 - "info": {
1665 - "type": "string"
1666 - },
1667 - "value": {
1668 - "type": "number",
1669 - "nullable" : "true"
1670 - },
1671 - "old_value": {
1672 - "type": "number",
1673 - "nullable" : "true"
1689 + },
1690 + "alarm_log_entry": {
1691 + "type": "object",
1692 + "properties": {
1693 + "hostname": {
1694 + "type": "string"
1695 + },
1696 + "unique_id": {
1697 + "type": "integer",
1698 + "format": "int32"
1699 + },
1700 + "alarm_id": {
1701 + "type": "integer",
1702 + "format": "int32"
1703 + },
1704 + "alarm_event_id": {
1705 + "type": "integer",
1706 + "format": "int32"
1707 + },
1708 + "name": {
1709 + "type": "string"
1710 + },
1711 + "chart": {
1712 + "type": "string"
1713 + },
1714 + "family": {
1715 + "type": "string"
1716 + },
1717 + "processed": {
1718 + "type": "boolean"
1719 + },
1720 + "updated": {
1721 + "type": "boolean"
1722 + },
1723 + "exec_run": {
1724 + "type": "integer",
1725 + "format": "int32"
1726 + },
1727 + "exec_failed": {
1728 + "type": "boolean"
1729 + },
1730 + "exec": {
1731 + "type": "string"
1732 + },
1733 + "recipient": {
1734 + "type": "string"
1735 + },
1736 + "exec_code": {
1737 + "type": "integer",
1738 + "format": "int32"
1739 + },
1740 + "source": {
1741 + "type": "string"
1742 + },
1743 + "units": {
1744 + "type": "string"
1745 + },
1746 + "when": {
1747 + "type": "integer",
1748 + "format": "int32"
1749 + },
1750 + "duration": {
1751 + "type": "integer",
1752 + "format": "int32"
1753 + },
1754 + "non_clear_duration": {
1755 + "type": "integer",
1756 + "format": "int32"
1757 + },
1758 + "status": {
1759 + "type": "string"
1760 + },
1761 + "old_status": {
1762 + "type": "string"
1763 + },
1764 + "delay": {
1765 + "type": "integer",
1766 + "format": "int32"
1767 + },
1768 + "delay_up_to_timestamp": {
1769 + "type": "integer",
1770 + "format": "int32"
1771 + },
1772 + "updated_by_id": {
1773 + "type": "integer",
1774 + "format": "int32"
1775 + },
1776 + "updates_id": {
1777 + "type": "integer",
1778 + "format": "int32"
1779 + },
1780 + "value_string": {
1781 + "type": "string"
1782 + },
1783 + "old_value_string": {
1784 + "type": "string"
1785 + },
1786 + "silenced": {
1787 + "type": "string"
1788 + },
1789 + "info": {
1790 + "type": "string"
1791 + },
1792 + "value": {
1793 + "type": "number",
1794 + "nullable": true
1795 + },
1796 + "old_value": {
1797 + "type": "number",
1798 + "nullable": true
1799 + }
1800 }
1801 }
1802 }
1803 }
1678 -}
1804 +}
\ No newline at end of file
web/api/netdata-swagger.yaml
+1124 -925
@@ -1,15 +1,8 @@
1 -swagger: '2.0'
1 +openapi: 3.0.0
2 info:
3 title: NetData API
4 description: Real-time performance and health monitoring.
5 version: 1.11.1_rolling
6 -host: registry.my-netdata.io
7 -schemes:
8 - - https
9 - - http
10 -basePath: /api/v1
11 -produces:
12 - - application/json
6 paths:
7 /info:
8 get:
@@ -26,21 +19,26 @@ paths:
19 * number of alarms in warning state
20 * number of alarms in critical state
21 responses:
29 - '200':
22 + "200":
23 description: netdata basic information.
31 - schema:
32 - $ref: '#/definitions/info'
33 - '503':
24 + content:
25 + application/json:
26 + schema:
27 + $ref: "#/components/schemas/info"
28 + "503":
29 description: netdata daemon not ready (used for health checks).
30 /charts:
31 get:
32 summary: Get a list of all charts available at the server
38 - description: The charts endpoint returns a summary about all charts stored in the netdata server.
33 + description: The charts endpoint returns a summary about all charts stored in the
34 + netdata server.
35 responses:
40 - '200':
36 + "200":
37 description: An array of charts.
42 - schema:
43 - $ref: '#/definitions/chart_summary'
38 + content:
39 + application/json:
40 + schema:
41 + $ref: "#/components/schemas/chart_summary"
42 /chart:
43 get:
44 summary: Get info about a specific chart
@@ -50,190 +48,247 @@ paths:
48 in: query
49 description: The id of the chart as returned by the /charts call.
50 required: true
53 - type: string
54 - format: as returned by /charts
55 - default: system.cpu
51 + schema:
52 + type: string
53 + format: as returned by /charts
54 + default: system.cpu
55 responses:
57 - '200':
56 + "200":
57 description: A javascript object with detailed information about the chart.
59 - schema:
60 - $ref: '#/definitions/chart'
61 - '400':
58 + content:
59 + application/json:
60 + schema:
61 + $ref: "#/components/schemas/chart"
62 + "400":
63 description: No chart id was supplied in the request.
63 - '404':
64 + "404":
65 description: No chart with the given id is found.
66 /alarm_variables:
67 get:
68 summary: List variables available to configure alarms for a chart
68 - 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.
69 + description: Returns the basic information of a chart and all the variables that can
70 + be used in alarm and template health configurations for the particular
71 + chart or family.
72 parameters:
73 - name: chart
74 in: query
75 description: The id of the chart as returned by the /charts call.
76 required: true
74 - type: string
75 - format: as returned by /charts
76 - default: system.cpu
77 - responses:
78 - '200':
79 - description: A javascript object with information about the chart and the available variables.
77 schema:
81 - $ref: '#/definitions/alarm_variables'
82 - '400':
78 + type: string
79 + format: as returned by /charts
80 + default: system.cpu
81 + responses:
82 + "200":
83 + description: A javascript object with information about the chart and the
84 + available variables.
85 + content:
86 + application/json:
87 + schema:
88 + $ref: "#/components/schemas/alarm_variables"
89 + "400":
90 description: Bad request - the body will include a message stating what is wrong.
84 - '404':
91 + "404":
92 description: No chart with the given id is found.
86 - '500':
87 - description: Internal server error. This usually means the server is out of memory.
93 + "500":
94 + description: Internal server error. This usually means the server is out of
95 + memory.
96 /data:
97 get:
98 summary: Get collected data for a specific chart
91 - description: The data endpoint returns data stored in the round robin database of a chart.
99 + description: The data endpoint returns data stored in the round robin database of a
100 + chart.
101 parameters:
102 - name: chart
103 in: query
104 description: The id of the chart as returned by the /charts call.
105 required: true
97 - type: string
98 - format: as returned by /charts
106 allowEmptyValue: false
100 - default: system.cpu
107 + schema:
108 + type: string
109 + format: as returned by /charts
110 + default: system.cpu
111 - name: dimension
112 in: query
103 - 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.'
113 + description: Zero, one or more dimension ids or names, as returned by the /chart
114 + call, separated with comma or pipe. Netdata simple patterns are
115 + supported.
116 required: false
105 - type: array
106 - items:
107 - type: string
108 - collectionFormat: pipes
109 - format: as returned by /charts
117 allowEmptyValue: false
118 + schema:
119 + type: array
120 + items:
121 + type: string
122 + format: as returned by /charts
123 - name: after
124 in: query
113 - 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). Netdata will adapt this parameter to the boundaries of the round robin database. The default is the beginning of the round robin database (i.e. by default netdata will attempt to return data for the entire database).'
125 + description: "This parameter can either be an absolute timestamp specifying the
126 + starting point of the data to be returned, or a relative number of
127 + seconds (negative, relative to parameter: before). Netdata will
128 + assume it is a relative number if it is less that 3 years (in
129 + seconds). Netdata will adapt this parameter to the boundaries of the
130 + round robin database. The default is the beginning of the round
131 + robin database (i.e. by default netdata will attempt to return data
132 + for the entire database)."
133 required: true
115 - type: number
116 - format: integer
134 allowEmptyValue: false
118 - default: -600
135 + schema:
136 + type: number
137 + format: integer
138 + default: -600
139 - name: before
140 in: query
121 - 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).'
141 + description: This parameter can either be an absolute timestamp specifying the
142 + ending point of the data to be returned, or a relative number of
143 + seconds (negative), relative to the last collected timestamp.
144 + Netdata will assume it is a relative number if it is less than 3
145 + years (in seconds). Netdata will adapt this parameter to the
146 + boundaries of the round robin database. The default is zero (i.e.
147 + the timestamp of the last value collected).
148 required: false
123 - type: number
124 - format: integer
125 - default: 0
149 + schema:
150 + type: number
151 + format: integer
152 + default: 0
153 - name: points
154 in: query
128 - 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.'
155 + description: The number of points to be returned. If not given, or it is <= 0, or
156 + it is bigger than the points stored in the round robin database for
157 + this chart for the given duration, all the available collected
158 + values for the given duration will be returned.
159 required: true
130 - type: number
131 - format: integer
160 allowEmptyValue: false
133 - default: 20
161 + schema:
162 + type: number
163 + format: integer
164 + default: 20
165 - name: group
166 in: query
136 - 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 dimesions to return the most extreme value in either direction).'
167 + description: The grouping method. If multiple collected values are to be grouped
168 + in order to return fewer points, this parameters defines the method
169 + of grouping. methods supported "min", "max", "average", "sum",
170 + "incremental-sum". "max" is actually calculated on the absolute
171 + value collected (so it works for both positive and negative
172 + dimesions to return the most extreme value in either direction).
173 required: true
138 - type: string
139 - enum:
140 - - min
141 - - max
142 - - average
143 - - median
144 - - stddev
145 - - sum
146 - - incremental-sum
147 - default: average
174 allowEmptyValue: false
175 + schema:
176 + type: string
177 + enum:
178 + - min
179 + - max
180 + - average
181 + - median
182 + - stddev
183 + - sum
184 + - incremental-sum
185 + default: average
186 - name: gtime
187 in: query
151 - 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).'
188 + description: The grouping number of seconds. This is used in conjunction with
189 + group=average to change the units of metrics (ie when the data is
190 + per-second, setting gtime=60 will turn them to per-minute).
191 required: false
153 - type: number
154 - format: integer
192 allowEmptyValue: false
156 - default: 0
193 + schema:
194 + type: number
195 + format: integer
196 + default: 0
197 - name: format
198 in: query
199 description: The format of the data to be returned.
200 required: true
161 - type: string
162 - enum:
163 - - json
164 - - jsonp
165 - - csv
166 - - tsv
167 - - tsv-excel
168 - - ssv
169 - - ssvcomma
170 - - datatable
171 - - datasource
172 - - html
173 - - markdown
174 - - array
175 - - csvjsonarray
176 - default: json
201 allowEmptyValue: false
202 + schema:
203 + type: string
204 + enum:
205 + - json
206 + - jsonp
207 + - csv
208 + - tsv
209 + - tsv-excel
210 + - ssv
211 + - ssvcomma
212 + - datatable
213 + - datasource
214 + - html
215 + - markdown
216 + - array
217 + - csvjsonarray
218 + default: json
219 - name: options
220 in: query
221 description: Options that affect data generation.
222 required: false
182 - type: array
183 - items:
184 - type: string
185 - enum:
186 - - nonzero
187 - - flip
188 - - jsonwrap
189 - - min2max
190 - - seconds
191 - - milliseconds
192 - - abs
193 - - absolute
194 - - absolute-sum
195 - - null2zero
196 - - objectrows
197 - - google_json
198 - - percentage
199 - - unaligned
200 - - match-ids
201 - - match-names
202 - - showcustomvars
203 - collectionFormat: pipes
204 - default:
205 - - seconds
206 - - jsonwrap
223 allowEmptyValue: false
224 + schema:
225 + type: array
226 + items:
227 + type: string
228 + enum:
229 + - nonzero
230 + - flip
231 + - jsonwrap
232 + - min2max
233 + - seconds
234 + - milliseconds
235 + - abs
236 + - absolute
237 + - absolute-sum
238 + - null2zero
239 + - objectrows
240 + - google_json
241 + - percentage
242 + - unaligned
243 + - match-ids
244 + - match-names
245 + - showcustomvars
246 + default:
247 + - seconds
248 + - jsonwrap
249 - name: callback
250 in: query
210 - description: 'For JSONP responses, the callback function name.'
251 + description: For JSONP responses, the callback function name.
252 required: false
212 - type: string
253 allowEmptyValue: true
254 + schema:
255 + type: string
256 - name: filename
257 in: query
216 - description: 'Add Content-Disposition: attachment; filename=<filename> header to the response, that will instruct the browser to save the response with the given filename.'
258 + description: "Add Content-Disposition: attachment; filename= header to
259 + the response, that will instruct the browser to save the response
260 + with the given filename."
261 required: false
218 - type: string
262 allowEmptyValue: true
263 + schema:
264 + type: string
265 - name: tqx
266 in: query
222 - description: '[Google Visualization API](https://developers.google.com/chart/interactive/docs/dev/implementing_data_source?hl=en) formatted parameter.'
267 + description: "[Google Visualization
268 + API](https://developers.google.com/chart/interactive/docs/dev/imple\
269 + menting_data_source?hl=en) formatted parameter."
270 required: false
224 - type: string
271 allowEmptyValue: true
226 - responses:
227 - '200':
228 - 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.'
272 schema:
230 - $ref: '#/definitions/data'
231 - '400':
273 + type: string
274 + responses:
275 + "200":
276 + description: The call was successful. The response includes the data in the
277 + format requested. Swagger2.0 does not process the discriminator
278 + field to show polymorphism. The response will be one of the
279 + sub-types of the data-schema according to the chosen format, e.g.
280 + json -> data_json.
281 + content:
282 + application/json:
283 + schema:
284 + $ref: "#/components/schemas/data"
285 + "400":
286 description: Bad request - the body will include a message stating what is wrong.
233 - '404':
287 + "404":
288 description: No chart with the given id is found.
235 - '500':
236 - description: Internal server error. This usually means the server is out of memory.
289 + "500":
290 + description: Internal server error. This usually means the server is out of
291 + memory.
292 /badge.svg:
293 get:
294 summary: Generate a SVG image for a chart (or dimension)
@@ -243,973 +298,1117 @@ paths:
298 in: query
299 description: The id of the chart as returned by the /charts call.
300 required: true
246 - type: string
247 - format: as returned by /charts
301 allowEmptyValue: false
249 - default: system.cpu
302 + schema:
303 + type: string
304 + format: as returned by /charts
305 + default: system.cpu
306 - name: alarm
307 in: query
308 description: The name of an alarm linked to the chart.
309 required: false
254 - type: string
255 - format: any text
310 allowEmptyValue: true
311 + schema:
312 + type: string
313 + format: any text
314 - name: dimension
315 in: query
259 - description: 'Zero, one or more dimension ids, as returned by the /chart call.'
316 + description: Zero, one or more dimension ids, as returned by the /chart call.
317 required: false
261 - type: array
262 - items:
263 - type: string
264 - collectionFormat: pipes
265 - format: as returned by /charts
318 allowEmptyValue: false
319 + schema:
320 + type: array
321 + items:
322 + type: string
323 + format: as returned by /charts
324 - name: after
325 in: query
269 - 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.'
326 + description: This parameter can either be an absolute timestamp specifying the
327 + starting point of the data to be returned, or a relative number of
328 + seconds, to the last collected timestamp. Netdata will assume it is
329 + a relative number if it is smaller than the duration of the round
330 + robin database for this chart. So, if the round robin database is
331 + 3600 seconds, any value from -3600 to 3600 will trigger relative
332 + arithmetics. Netdata will adapt this parameter to the boundaries of
333 + the round robin database.
334 required: true
271 - type: number
272 - format: integer
335 allowEmptyValue: false
274 - default: -600
336 + schema:
337 + type: number
338 + format: integer
339 + default: -600
340 - name: before
341 in: query
277 - 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.'
342 + description: This parameter can either be an absolute timestamp specifying the
343 + ending point of the data to be returned, or a relative number of
344 + seconds, to the last collected timestamp. Netdata will assume it is
345 + a relative number if it is smaller than the duration of the round
346 + robin database for this chart. So, if the round robin database is
347 + 3600 seconds, any value from -3600 to 3600 will trigger relative
348 + arithmetics. Netdata will adapt this parameter to the boundaries of
349 + the round robin database.
350 required: false
279 - type: number
280 - format: integer
281 - default: 0
351 + schema:
352 + type: number
353 + format: integer
354 + default: 0
355 - name: group
356 in: query
284 - 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 dimesions to return the most extreme value in either direction).'
357 + description: The grouping method. If multiple collected values are to be grouped
358 + in order to return fewer points, this parameters defines the method
359 + of grouping. methods are supported "min", "max", "average", "sum",
360 + "incremental-sum". "max" is actually calculated on the absolute
361 + value collected (so it works for both positive and negative
362 + dimesions to return the most extreme value in either direction).
363 required: true
286 - type: string
287 - enum:
288 - - min
289 - - max
290 - - average
291 - - median
292 - - stddev
293 - - sum
294 - - incremental-sum
295 - default: average
364 allowEmptyValue: false
365 + schema:
366 + type: string
367 + enum:
368 + - min
369 + - max
370 + - average
371 + - median
372 + - stddev
373 + - sum
374 + - incremental-sum
375 + default: average
376 - name: options
377 in: query
378 description: Options that affect data generation.
379 required: false
301 - type: array
302 - items:
303 - type: string
304 - enum:
305 - - abs
306 - - absolute
307 - - display-absolute
308 - - absolute-sum
309 - - null2zero
310 - - percentage
311 - - unaligned
312 - collectionFormat: pipes
313 - default:
314 - - absolute
380 allowEmptyValue: true
381 + schema:
382 + type: array
383 + items:
384 + type: string
385 + enum:
386 + - abs
387 + - absolute
388 + - display-absolute
389 + - absolute-sum
390 + - null2zero
391 + - percentage
392 + - unaligned
393 + default:
394 + - absolute
395 - name: label
396 in: query
397 description: A text to be used as the label.
398 required: false
320 - type: string
321 - format: any text
399 allowEmptyValue: true
400 + schema:
401 + type: string
402 + format: any text
403 - name: units
404 in: query
405 description: A text to be used as the units.
406 required: false
327 - type: string
328 - format: any text
407 allowEmptyValue: true
408 + schema:
409 + type: string
410 + format: any text
411 - name: label_color
412 in: query
413 description: A color to be used for the background of the label.
414 required: false
334 - type: string
335 - format: any text
415 allowEmptyValue: true
416 + schema:
417 + type: string
418 + format: any text
419 - name: value_color
420 in: query
339 - description: 'A color to be used for the background of the label. You can set multiple using a pipe with a condition each, like this: color<value|color>value|color:null The following operators are supported: >, <, >=, <=, =, :null (to check if no value exists).'
421 + description: "A color to be used for the background of the label. You can set
422 + multiple using a pipe with a condition each, like this:
423 + colorvalue|color:null The following operators are
424 + supported: >, <, >=, <=, =, :null (to check if no value exists)."
425 required: false
341 - type: string
342 - format: any text
426 allowEmptyValue: true
427 + schema:
428 + type: string
429 + format: any text
430 - name: multiply
431 in: query
346 - description: Multiply the value with this number for rendering it at the image (integer value required).
432 + description: Multiply the value with this number for rendering it at the image
433 + (integer value required).
434 required: false
348 - type: number
349 - format: integer
435 allowEmptyValue: true
436 + schema:
437 + type: number
438 + format: integer
439 - name: divide
440 in: query
353 - description: Divide the value with this number for rendering it at the image (integer value required).
441 + description: Divide the value with this number for rendering it at the image
442 + (integer value required).
443 required: false
355 - type: number
356 - format: integer
444 allowEmptyValue: true
445 + schema:
446 + type: number
447 + format: integer
448 - name: scale
449 in: query
450 description: Set the scale of the badge (greater or equal to 100).
451 required: false
362 - type: number
363 - format: integer
452 allowEmptyValue: true
453 + schema:
454 + type: number
455 + format: integer
456 responses:
366 - '200':
457 + "200":
458 description: The call was successful. The response should be an SVG image.
368 - '400':
459 + "400":
460 description: Bad request - the body will include a message stating what is wrong.
370 - '404':
461 + "404":
462 description: No chart with the given id is found.
372 - '500':
373 - description: Internal server error. This usually means the server is out of memory.
463 + "500":
464 + description: Internal server error. This usually means the server is out of
465 + memory.
466 /allmetrics:
467 get:
468 summary: Get a value of all the metrics maintained by netdata
377 - description: The allmetrics endpoint returns the latest value of all charts and dimensions stored in the netdata server.
469 + description: The allmetrics endpoint returns the latest value of all charts and
470 + dimensions stored in the netdata server.
471 parameters:
472 - name: format
473 in: query
474 description: The format of the response to be returned.
475 required: true
383 - type: string
384 - enum:
385 - - shell
386 - - prometheus
387 - - prometheus_all_hosts
388 - - json
389 - default: shell
476 + schema:
477 + type: string
478 + enum:
479 + - shell
480 + - prometheus
481 + - prometheus_all_hosts
482 + - json
483 + default: shell
484 - name: help
485 in: query
486 description: Enable or disable HELP lines in prometheus output.
487 required: false
394 - type: string
395 - enum:
396 - - 'yes'
397 - - 'no'
398 - default: 'no'
488 + schema:
489 + type: string
490 + enum:
491 + - yes
492 + - no
493 + default: no
494 - name: types
495 in: query
496 description: Enable or disable TYPE lines in prometheus output.
497 required: false
403 - type: string
404 - enum:
405 - - 'yes'
406 - - 'no'
407 - default: 'no'
498 + schema:
499 + type: string
500 + enum:
501 + - yes
502 + - no
503 + default: no
504 - name: timestamps
505 in: query
506 description: Enable or disable timestamps in prometheus output.
507 required: false
412 - type: string
413 - enum:
414 - - 'yes'
415 - - 'no'
416 - default: 'yes'
508 + schema:
509 + type: string
510 + enum:
511 + - yes
512 + - no
513 + default: yes
514 - name: names
515 in: query
419 - description: When enabled netdata will report dimension names. When disabled netdata will report dimension IDs. The default is controlled in netdata.conf.
516 + description: When enabled netdata will report dimension names. When disabled
517 + netdata will report dimension IDs. The default is controlled in
518 + netdata.conf.
519 required: false
421 - type: string
422 - enum:
423 - - 'yes'
424 - - 'no'
425 - default: 'yes'
520 + schema:
521 + type: string
522 + enum:
523 + - yes
524 + - no
525 + default: yes
526 - name: oldunits
527 in: query
428 - 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.'
528 + description: When enabled, netdata will show metric names for the default
529 + source=average as they appeared before 1.12, by using the legacy
530 + unit naming conventions.
531 required: false
430 - type: string
431 - enum:
432 - - 'yes'
433 - - 'no'
434 - default: 'yes'
532 + schema:
533 + type: string
534 + enum:
535 + - yes
536 + - no
537 + default: yes
538 - name: hideunits
539 in: query
437 - description: 'When enabled, netdata will not include the units in the metric names, for the default source=average.'
540 + description: When enabled, netdata will not include the units in the metric
541 + names, for the default source=average.
542 required: false
439 - type: string
440 - enum:
441 - - 'yes'
442 - - 'no'
443 - default: 'yes'
543 + schema:
544 + type: string
545 + enum:
546 + - yes
547 + - no
548 + default: yes
549 - name: server
550 in: query
446 - description: Set a distinct name of the client querying prometheus metrics. Netdata will use the client IP if this is not set.
551 + description: Set a distinct name of the client querying prometheus metrics.
552 + Netdata will use the client IP if this is not set.
553 required: false
448 - type: string
449 - format: any text
554 + schema:
555 + type: string
556 + format: any text
557 - name: prefix
558 in: query
559 description: Prefix all prometheus metrics with this string.
560 required: false
454 - type: string
455 - format: any text
561 + schema:
562 + type: string
563 + format: any text
564 - name: data
565 in: query
458 - description: Select the prometheus response data source. There is a setting in netdata.conf for the default.
566 + description: Select the prometheus response data source. There is a setting in
567 + netdata.conf for the default.
568 required: false
460 - type: string
461 - enum:
462 - - as-collected
463 - - average
464 - - sum
465 - default: average
569 + schema:
570 + type: string
571 + enum:
572 + - as-collected
573 + - average
574 + - sum
575 + default: average
576 responses:
467 - '200':
577 + "200":
578 description: All the metrics returned in the format requested.
469 - '400':
579 + "400":
580 description: The format requested is not supported.
581 /alarms:
582 get:
583 summary: Get a list of active or raised alarms on the server
474 - 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.'
584 + description: The alarms endpoint returns the list of all raised or enabled alarms on
585 + the netdata server. Called without any parameters, the raised alarms in
586 + state WARNING or CRITICAL are returned. By passing "?all", all the
587 + enabled alarms are returned.
588 parameters:
589 - name: all
590 in: query
478 - description: 'If passed, all enabled alarms are returned.'
591 + description: If passed, all enabled alarms are returned.
592 required: false
480 - type: boolean
593 allowEmptyValue: true
594 + schema:
595 + type: boolean
596 responses:
483 - '200':
597 + "200":
598 description: An object containing general info and a linked list of alarms.
485 - schema:
486 - $ref: '#/definitions/alarms'
599 + content:
600 + application/json:
601 + schema:
602 + $ref: "#/components/schemas/alarms"
603 /alarm_log:
604 get:
605 summary: Retrieves the entries of the alarm log
490 - description: 'Returns an array of alarm_log entries, with historical information on raised and cleared alarms.'
606 + description: Returns an array of alarm_log entries, with historical information on
607 + raised and cleared alarms.
608 parameters:
609 - name: after
610 in: query
494 - 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.'
611 + description: Passing the parameter after=UNIQUEID returns all the events in the
612 + alarm log that occurred after UNIQUEID. An automated series of calls
613 + would call the interface once without after=, store the last
614 + UNIQUEID of the returned set, and give it back to get incrementally
615 + the next events.
616 required: false
496 - type: integer
617 + schema:
618 + type: integer
619 responses:
498 - '200':
620 + "200":
621 description: An array of alarm log entries.
500 - schema:
501 - type: array
502 - items:
503 - $ref: '#/definitions/alarm_log_entry'
622 + content:
623 + application/json:
624 + schema:
625 + type: array
626 + items:
627 + $ref: "#/components/schemas/alarm_log_entry"
628 /alarm_count:
629 get:
630 summary: Get an overall status of the chart
507 - description: Checks multiple charts with the same context and counts number of alarms with given status.
631 + description: Checks multiple charts with the same context and counts number of alarms
632 + with given status.
633 parameters:
634 - in: query
635 name: context
636 description: Specify context which should be checked.
637 required: false
638 allowEmptyValue: true
514 - type: array
515 - items:
516 - type: string
517 - collectionFormat: pipes
518 - default:
519 - - system.cpu
639 + schema:
640 + type: array
641 + items:
642 + type: string
643 + default:
644 + - system.cpu
645 - in: query
646 name: status
647 description: Specify alarm status to count.
648 required: false
649 allowEmptyValue: true
525 - type: string
526 - enum:
527 - - REMOVED
528 - - UNDEFINED
529 - - UNINITIALIZED
530 - - CLEAR
531 - - RAISED
532 - - WARNING
533 - - CRITICAL
534 - default: RAISED
535 - responses:
536 - '200':
537 - description: An object containing a count of alarms with given status for given contexts.
650 schema:
539 - type: array
540 - items:
541 - type: number
542 - '500':
543 - description: Internal server error. This usually means the server is out of memory.
651 + type: string
652 + enum:
653 + - REMOVED
654 + - UNDEFINED
655 + - UNINITIALIZED
656 + - CLEAR
657 + - RAISED
658 + - WARNING
659 + - CRITICAL
660 + default: RAISED
661 + responses:
662 + "200":
663 + description: An object containing a count of alarms with given status for given
664 + contexts.
665 + content:
666 + application/json:
667 + schema:
668 + type: array
669 + items:
670 + type: number
671 + "500":
672 + description: Internal server error. This usually means the server is out of
673 + memory.
674 /manage/health:
675 get:
546 - summary: Accesses the health management API to control health checks and notifications at runtime.
547 - 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 scenaria, 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.'
676 + summary: Accesses the health management API to control health checks and
677 + notifications at runtime.
678 + description: Available from Netdata v1.12 and above, protected via bearer
679 + authorization. Especially useful for maintenance periods, the API allows
680 + you to disable health checks completely, silence alarm notifications, or
681 + Disable/Silence specific alarms that match selectors on alarm/template
682 + name, chart, context, host and family. For the simple disable/silence
683 + all scenaria, only the cmd parameter is required. The other parameters
684 + are used to define alarm selectors. For more information and examples,
685 + refer to the netdata documentation.
686 parameters:
687 - name: cmd
688 in: query
551 - 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.'
689 + description: "DISABLE ALL: No alarm criteria are evaluated, nothing is written in
690 + the alarm log. SILENCE ALL: No notifications are sent. RESET: Return
691 + to the default state. DISABLE/SILENCE: Set the mode to be used for
692 + the alarms matching the criteria of the alarm selectors. LIST: Show
693 + active configuration."
694 required: false
553 - type: string
554 - enum:
555 - - DISABLE ALL
556 - - SILENCE ALL
557 - - DISABLE
558 - - SILENCE
559 - - RESET
560 - - LIST
695 + schema:
696 + type: string
697 + enum:
698 + - DISABLE ALL
699 + - SILENCE ALL
700 + - DISABLE
701 + - SILENCE
702 + - RESET
703 + - LIST
704 - name: alarm
705 in: query
706 description: The expression provided will match both `alarm` and `template` names.
564 - type: string
707 + schema:
708 + type: string
709 - name: chart
710 in: query
567 - description: 'Chart ids/names, as shown on the dashboard. These will match the `on` entry of a configured `alarm`.'
568 - type: string
711 + description: Chart ids/names, as shown on the dashboard. These will match the
712 + `on` entry of a configured `alarm`.
713 + schema:
714 + type: string
715 - name: context
716 in: query
571 - description: 'Chart context, as shown on the dashboard. These will match the `on` entry of a configured `template`.'
572 - type: string
717 + description: Chart context, as shown on the dashboard. These will match the `on`
718 + entry of a configured `template`.
719 + schema:
720 + type: string
721 - name: hosts
722 in: query
723 description: The hostnames that will need to match.
576 - type: string
724 + schema:
725 + type: string
726 - name: families
727 in: query
728 description: The alarm families.
580 - type: string
729 + schema:
730 + type: string
731 responses:
582 - '200':
732 + "200":
733 description: A plain text response based on the result of the command.
584 - '403':
734 + "403":
735 description: Bearer authentication error.
586 -definitions:
587 - info:
588 - type: object
589 - properties:
590 - version:
591 - type: string
592 - description: netdata version of the server.
593 - example: 1.11.1_rolling
594 - uid:
595 - type: string
596 - description: netdata unique id of the server.
597 - example: 24e9fe3c-f2ac-11e8-bafc-0242ac110002
598 - mirrored_hosts:
599 - type: array
600 - description: List of hosts mirrored of the server (include itself).
601 - items:
736 +servers:
737 + - url: https://registry.my-netdata.io/api/v1
738 + - url: http://registry.my-netdata.io/api/v1
739 +components:
740 + schemas:
741 + info:
742 + type: object
743 + properties:
744 + version:
745 + type: string
746 + description: netdata version of the server.
747 + example: 1.11.1_rolling
748 + uid:
749 + type: string
750 + description: netdata unique id of the server.
751 + example: 24e9fe3c-f2ac-11e8-bafc-0242ac110002
752 + mirrored_hosts:
753 + type: array
754 + description: List of hosts mirrored of the server (include itself).
755 + items:
756 + type: string
757 + example:
758 + - host1.example.com
759 + - host2.example.com
760 + os_name:
761 + type: string
762 + description: Operating System Name.
763 + example: Manjaro Linux
764 + os_id:
765 + type: string
766 + description: Operating System ID.
767 + example: manjaro
768 + os_id_like:
769 + type: string
770 + description: Known OS similar to this OS.
771 + example: arch
772 + os_version:
773 type: string
603 - example:
604 - - host1.example.com
605 - - host2.example.com
606 - os_name:
607 - type: string
608 - description: Operating System Name.
609 - example: Manjaro Linux
610 - os_id:
611 - type: string
612 - description: Operating System ID.
613 - example: manjaro
614 - os_id_like:
615 - type: string
616 - description: Known OS similar to this OS.
617 - example: arch
618 - os_version:
619 - type: string
620 - description: Operating System Version.
621 - example: 18.0.4
622 - os_version_id:
623 - type: string
624 - description: Operating System Version ID.
625 - example: unknown
626 - os_detection:
627 - type: string
628 - description: OS parameters detection method.
629 - example: Mixed
630 - kernel_name:
631 - type: string
632 - description: Kernel Name.
633 - example: Linux
634 - kernel_version:
635 - type: string
636 - description: Kernel Version.
637 - example: 4.19.32-1-MANJARO
638 - architecture:
639 - type: string
640 - description: Kernel architecture.
641 - example: x86_64
642 - virtualization:
643 - type: string
644 - description: Virtualization Type.
645 - example: kvm
646 - virt_detection:
647 - type: string
648 - description: Virtualization detection method.
649 - example: systemd-detect-virt
650 - container:
651 - type: string
652 - description: Container technology.
653 - example: docker
654 - container_detection:
655 - type: string
656 - description: Container technology detection method.
657 - example: dockerenv
658 - collectors:
659 - type: array
660 - items:
774 + description: Operating System Version.
775 + example: 18.0.4
776 + os_version_id:
777 + type: string
778 + description: Operating System Version ID.
779 + example: unknown
780 + os_detection:
781 + type: string
782 + description: OS parameters detection method.
783 + example: Mixed
784 + kernel_name:
785 + type: string
786 + description: Kernel Name.
787 + example: Linux
788 + kernel_version:
789 + type: string
790 + description: Kernel Version.
791 + example: 4.19.32-1-MANJARO
792 + architecture:
793 + type: string
794 + description: Kernel architecture.
795 + example: x86_64
796 + virtualization:
797 + type: string
798 + description: Virtualization Type.
799 + example: kvm
800 + virt_detection:
801 + type: string
802 + description: Virtualization detection method.
803 + example: systemd-detect-virt
804 + container:
805 + type: string
806 + description: Container technology.
807 + example: docker
808 + container_detection:
809 + type: string
810 + description: Container technology detection method.
811 + example: dockerenv
812 + collectors:
813 + type: array
814 + items:
815 + type: object
816 + description: Array of collector plugins and modules.
817 + properties:
818 + plugin:
819 + type: string
820 + description: Collector plugin.
821 + example: python.d.plugin
822 + module:
823 + type: string
824 + description: Module of the collector plugin.
825 + example: dockerd
826 + alarms:
827 type: object
662 - description: Array of collector plugins and modules.
828 + description: Number of alarms in the server.
829 properties:
664 - plugin:
665 - type: string
666 - description: Collector plugin.
667 - example: python.d.plugin
668 - module:
669 - type: string
670 - description: Module of the collector plugin.
671 - example: dockerd
672 - alarms:
673 - type: object
674 - description: Number of alarms in the server.
675 - properties:
676 - normal:
677 - type: integer
678 - description: Number of alarms in normal state.
679 - warning:
680 - type: integer
681 - description: Number of alarms in warning state.
682 - critical:
683 - type: integer
684 - description: Number of alarms in critical state.
685 - chart_summary:
686 - type: object
687 - properties:
688 - hostname:
689 - type: string
690 - description: The hostname of the netdata server.
691 - version:
692 - type: string
693 - description: netdata version of the server.
694 - release_channel:
695 - type: string
696 - description: The release channel of the build on the server.
697 - example: nightly
698 - timezone:
699 - type: string
700 - description: The current timezone on the server.
701 - os:
702 - type: string
703 - description: The netdata server host operating system.
704 - enum:
705 - - macos
706 - - linux
707 - - freebsd
708 - history:
709 - type: number
710 - description: 'The duration, in seconds, of the round robin database maintained by netdata.'
711 - memory_mode:
712 - type: string
713 - description: The name of the database memory mode on the server.
714 - update_every:
715 - type: number
716 - description: The default update frequency of the netdata server. All charts have an update frequency equal or bigger than this.
717 - charts:
718 - type: object
719 - 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.
720 - properties:
721 - $ref: '#/definitions/chart'
722 - charts_count:
723 - type: number
724 - description: The number of charts.
725 - dimensions_count:
726 - type: number
727 - description: The total number of dimensions.
728 - alarms_count:
729 - type: number
730 - description: The number of alarms.
731 - rrd_memory_bytes:
732 - type: number
733 - description: The size of the round robin database in bytes.
734 - chart:
735 - type: object
736 - properties:
737 - id:
738 - type: string
739 - description: The unique id of the chart.
740 - name:
741 - type: string
742 - description: The name of the chart.
743 - type:
744 - type: string
745 - description: The type of the chart. Types are not handled by netdata. You can use this field for anything you like.
746 - family:
747 - type: string
748 - description: The family of the chart. Families are not handled by netdata. You can use this field for anything you like.
749 - title:
750 - type: string
751 - description: The title of the chart.
752 - priority:
753 - type: number
754 - 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.
755 - enabled:
756 - type: boolean
757 - description: 'True when the chart is enabled. Disabled charts do not currently collect values, but they may have historical values available.'
758 - units:
759 - type: string
760 - description: The unit of measurement for the values of all dimensions of the chart.
761 - data_url:
762 - type: string
763 - 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.
764 - chart_type:
765 - type: string
766 - description: The chart type.
767 - enum:
768 - - line
769 - - area
770 - - stacked
771 - duration:
772 - type: number
773 - description: 'The duration, in seconds, of the round robin database maintained by netdata.'
774 - first_entry:
775 - type: number
776 - description: The UNIX timestamp of the first entry (the oldest) in the round robin database.
777 - last_entry:
778 - type: number
779 - description: The UNIX timestamp of the latest entry in the round robin database.
780 - update_every:
781 - type: number
782 - description: 'The update frequency of this chart, in seconds. One value every this amount of time is kept in the round robin database.'
783 - dimensions:
784 - type: object
785 - 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.'
786 - additionalProperties:
830 + normal:
831 + type: integer
832 + description: Number of alarms in normal state.
833 + warning:
834 + type: integer
835 + description: Number of alarms in warning state.
836 + critical:
837 + type: integer
838 + description: Number of alarms in critical state.
839 + chart_summary:
840 + type: object
841 + properties:
842 + hostname:
843 + type: string
844 + description: The hostname of the netdata server.
845 + version:
846 + type: string
847 + description: netdata version of the server.
848 + release_channel:
849 + type: string
850 + description: The release channel of the build on the server.
851 + example: nightly
852 + timezone:
853 + type: string
854 + description: The current timezone on the server.
855 + os:
856 + type: string
857 + description: The netdata server host operating system.
858 + enum:
859 + - macos
860 + - linux
861 + - freebsd
862 + history:
863 + type: number
864 + description: The duration, in seconds, of the round robin database maintained by
865 + netdata.
866 + memory_mode:
867 + type: string
868 + description: The name of the database memory mode on the server.
869 + update_every:
870 + type: number
871 + description: The default update frequency of the netdata server. All charts have
872 + an update frequency equal or bigger than this.
873 + charts:
874 type: object
788 - properties:
789 - name:
790 - type: string
791 - description: The name of the dimension
792 - chart_variables:
793 - type: object
794 - properties:
795 - $ref: '#/definitions/chart_variables'
796 - green:
797 - type: number
798 - nullable: 'true'
799 - description: Chart health green threshold.
800 - red:
801 - type: number
802 - nullable: 'true'
803 - description: Chart health red threshold.
804 - alarm_variables:
805 - type: object
806 - properties:
807 - chart:
808 - type: string
809 - description: The unique id of the chart.
810 - chart_name:
811 - type: string
812 - description: The name of the chart.
813 - cnart_context:
814 - type: string
815 - description: The context of the chart. It is shared across multiple monitored software or hardware instances and used in alarm templates.
816 - family:
817 - type: string
818 - description: The family of the chart.
819 - host:
820 - type: string
821 - description: The host containing the chart.
822 - chart_variables:
823 - type: object
824 - properties:
825 - $ref: '#/definitions/chart_variables'
826 - family_variables:
827 - type: object
828 - properties:
829 - varname1:
830 - type: number
831 - format: float
832 - varname2:
833 - type: number
834 - format: float
835 - host_variables:
836 - type: object
837 - properties:
838 - varname1:
839 - type: number
840 - format: float
841 - varname2:
842 - type: number
843 - format: float
844 - chart_variables:
845 - type: object
846 - properties:
847 - varname1:
848 - type: number
849 - format: float
850 - varname2:
851 - type: number
852 - format: float
853 - data:
854 - type: object
855 - discriminator: format
856 - description: 'Response will contain the appropriate subtype, e.g. data_json depending on the requested format.'
857 - properties:
858 - api:
859 - type: number
860 - description: 'The API version this conforms to, currently 1.'
861 - id:
862 - type: string
863 - description: The unique id of the chart.
864 - name:
865 - type: string
866 - description: The name of the chart.
867 - update_every:
868 - type: number
869 - description: 'The update frequency of this chart, in seconds. One value every this amount of time is kept in the round robin database (indepedently of the current view).'
870 - view_update_every:
871 - type: number
872 - 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.'
873 - first_entry:
874 - type: number
875 - description: The UNIX timestamp of the first entry (the oldest) in the round robin database (indepedently of the current view).
876 - last_entry:
877 - type: number
878 - description: The UNIX timestamp of the latest entry in the round robin database (indepedently of the current view).
879 - after:
880 - type: number
881 - description: The UNIX timestamp of the first entry (the oldest) returned in this response.
882 - before:
883 - type: number
884 - description: The UNIX timestamp of the latest entry returned in this response.
885 - min:
886 - type: number
887 - description: The minimum value returned in the current view. This can be used to size the y-series of the chart.
888 - max:
889 - type: number
890 - description: The maximum value returned in the current view. This can be used to size the y-series of the chart.
891 - dimension_names:
892 - description: The dimension names of the chart as returned in the current view.
893 - type: array
894 - items:
875 + description: An object containing all the chart objects available at the netdata
876 + server. This is used as an indexed array. The key of each chart
877 + object is the id of the chart.
878 + additionalProperties:
879 + $ref: "#/components/schemas/chart"
880 + charts_count:
881 + type: number
882 + description: The number of charts.
883 + dimensions_count:
884 + type: number
885 + description: The total number of dimensions.
886 + alarms_count:
887 + type: number
888 + description: The number of alarms.
889 + rrd_memory_bytes:
890 + type: number
891 + description: The size of the round robin database in bytes.
892 + chart:
893 + type: object
894 + properties:
895 + id:
896 type: string
896 - dimension_ids:
897 - description: The dimension IDs of the chart as returned in the current view.
898 - type: array
899 - items:
897 + description: The unique id of the chart.
898 + name:
899 type: string
901 - latest_values:
902 - description: The latest values collected for the chart (indepedently of the current view).
903 - type: array
904 - items:
900 + description: The name of the chart.
901 + type:
902 type: string
906 - view_latest_values:
907 - description: The latest values returned with this response.
908 - type: array
909 - items:
903 + description: The type of the chart. Types are not handled by netdata. You can use
904 + this field for anything you like.
905 + family:
906 type: string
911 - dimensions:
912 - type: number
913 - description: The number of dimensions returned.
914 - points:
915 - type: number
916 - description: The number of rows / points returned.
917 - format:
918 - type: string
919 - description: The format of the result returned.
920 - chart_variables:
921 - type: object
922 - properties:
923 - $ref: '#/definitions/chart_variables'
924 - data_json:
925 - description: Data response in json format.
926 - allOf:
927 - - $ref: '#/definitions/data'
928 - - properties:
929 - result:
930 - type: object
931 - properties:
932 - labels:
933 - description: The dimensions retrieved from the chart.
934 - type: array
935 - items:
936 - type: string
937 - data:
938 - description: 'The data requested, one element per sample with each element containing the values of the dimensions described in the labels value.'
939 - type: array
940 - items:
941 - type: number
942 - description: 'The result requested, in the format requested.'
943 - data_flat:
944 - description: Data response in csv / tsv / tsv-excel / ssv / ssv-comma / markdown / html formats.
945 - allOf:
946 - - $ref: '#/definitions/data'
947 - - properties:
948 - result:
949 - type: string
950 - data_array:
951 - description: Data response in array format.
952 - allOf:
953 - - $ref: '#/definitions/data'
954 - - properties:
955 - result:
956 - type: array
957 - items:
958 - type: number
959 - data_csvjsonarray:
960 - description: Data response in csvjsonarray format.
961 - allOf:
962 - - $ref: '#/definitions/data'
963 - - properties:
964 - result:
965 - description: 'The first inner array contains strings showing the labels of each column, each subsequent array contains the values for each point in time.'
966 - type: array
967 - items:
968 - type: array
969 - items: {}
970 - data_datatable:
971 - description: Data response in datatable / datasource formats (suitable for Google Charts).
972 - allOf:
973 - - $ref: '#/definitions/data'
974 - - properties:
975 - result:
976 - type: object
977 - properties:
978 - cols:
979 - type: array
980 - items:
981 - type: object
982 - properties:
983 - id:
984 - description: Always empty - for future use.
985 - label:
986 - description: The dimension returned from the chart.
987 - pattern:
988 - description: Always empty - for future use.
989 - type:
990 - description: The type of data in the column / chart-dimension.
991 - p:
992 - description: Contains any annotations for the column.
993 - required:
994 - - id
995 - - label
996 - - pattern
997 - - type
998 - rows:
999 - type: array
1000 - items:
1001 - type: object
1002 - properties:
1003 - c:
1004 - type: array
1005 - items:
1006 - properties:
1007 - v:
1008 - description: 'Each value in the row is represented by an object named `c` with five v fields: data, null, null, 0, the value. This format is fixed by the Google Charts API.'
1009 - alarms:
1010 - type: object
1011 - properties:
1012 - hostname:
1013 - type: string
1014 - latest_alarm_log_unique_id:
1015 - type: integer
1016 - format: int32
1017 - status:
1018 - type: boolean
1019 - now:
1020 - type: integer
1021 - format: int32
1022 - alarms:
1023 - type: object
1024 - properties:
1025 - chart-name.alarm-name:
907 + description: The family of the chart. Families are not handled by netdata. You
908 + can use this field for anything you like.
909 + title:
910 + type: string
911 + description: The title of the chart.
912 + priority:
913 + type: number
914 + description: The relative priority of the chart. NetData does not care about
915 + priorities. This is just an indication of importance for the chart
916 + viewers to sort charts of higher priority (lower number) closer to
917 + the top. Priority sorting should only be used among charts of the
918 + same type or family.
919 + enabled:
920 + type: boolean
921 + description: True when the chart is enabled. Disabled charts do not currently
922 + collect values, but they may have historical values available.
923 + units:
924 + type: string
925 + description: The unit of measurement for the values of all dimensions of the
926 + chart.
927 + data_url:
928 + type: string
929 + description: The absolute path to get data values for this chart. You are
930 + expected to use this path as the base when constructing the URL to
931 + fetch data values for this chart.
932 + chart_type:
933 + type: string
934 + description: The chart type.
935 + enum:
936 + - line
937 + - area
938 + - stacked
939 + duration:
940 + type: number
941 + description: The duration, in seconds, of the round robin database maintained by
942 + netdata.
943 + first_entry:
944 + type: number
945 + description: The UNIX timestamp of the first entry (the oldest) in the round
946 + robin database.
947 + last_entry:
948 + type: number
949 + description: The UNIX timestamp of the latest entry in the round robin database.
950 + update_every:
951 + type: number
952 + description: The update frequency of this chart, in seconds. One value every this
953 + amount of time is kept in the round robin database.
954 + dimensions:
955 + type: object
956 + description: "An object containing all the chart dimensions available for the
957 + chart. This is used as an indexed array. For each pair in the
958 + dictionary: the key is the id of the dimension and the value is a
959 + dictionary containing the name."
960 + additionalProperties:
961 type: object
962 properties:
1028 - id:
1029 - type: integer
1030 - format: int32
963 name:
964 type: string
1033 - description: Full alarm name.
1034 - chart:
1035 - type: string
1036 - family:
1037 - type: string
1038 - active:
1039 - type: boolean
1040 - description: Will be false only if the alarm is disabled in the configuration.
1041 - disabled:
1042 - type: boolean
1043 - description: Whether the health check for this alarm has been disabled via a health command API DISABLE command.
1044 - silenced:
1045 - type: boolean
1046 - description: Whether notifications for this alarm have been silenced via a health command API SILENCE command.
1047 - exec:
1048 - type: string
1049 - recipient:
1050 - type: string
1051 - source:
1052 - type: string
1053 - units:
1054 - type: string
1055 - info:
1056 - type: string
1057 - status:
1058 - type: string
1059 - last_status_change:
1060 - type: integer
1061 - format: int32
1062 - last_updated:
1063 - type: integer
1064 - format: int32
1065 - next_update:
1066 - type: integer
1067 - format: int32
1068 - update_every:
1069 - type: integer
1070 - format: int32
1071 - delay_up_duration:
1072 - type: integer
1073 - format: int32
1074 - delay_down_duration:
1075 - type: integer
1076 - format: int32
1077 - delay_max_duration:
1078 - type: integer
1079 - format: int32
1080 - delay_multiplier:
1081 - type: integer
1082 - format: int32
1083 - delay:
1084 - type: integer
1085 - format: int32
1086 - delay_up_to_timestamp:
1087 - type: integer
1088 - format: int32
1089 - value_string:
1090 - type: string
1091 - no_clear_notification:
1092 - type: boolean
1093 - lookup_dimensions:
1094 - type: string
1095 - db_after:
1096 - type: integer
1097 - format: int32
1098 - db_before:
1099 - type: integer
1100 - format: int32
1101 - lookup_method:
1102 - type: string
1103 - lookup_after:
1104 - type: integer
1105 - format: int32
1106 - lookup_before:
1107 - type: integer
1108 - format: int32
1109 - lookup_options:
1110 - type: string
1111 - calc:
1112 - type: string
1113 - calc_parsed:
1114 - type: string
1115 - warn:
1116 - type: string
1117 - warn_parsed:
1118 - type: string
1119 - crit:
1120 - type: string
1121 - crit_parsed:
1122 - type: string
1123 - warn_repeat_every:
1124 - type: integer
1125 - format: int32
1126 - crit_repeat_every:
1127 - type: integer
1128 - format: int32
1129 - green:
1130 - type: string
1131 - format: nullable
1132 - red:
1133 - type: string
1134 - format: nullable
1135 - value:
965 + description: The name of the dimension
966 + chart_variables:
967 + type: object
968 + additionalProperties:
969 + $ref: "#/components/schemas/chart_variables"
970 + green:
971 + type: number
972 + nullable: true
973 + description: Chart health green threshold.
974 + red:
975 + type: number
976 + nullable: true
977 + description: Chart health red threshold.
978 + alarm_variables:
979 + type: object
980 + properties:
981 + chart:
982 + type: string
983 + description: The unique id of the chart.
984 + chart_name:
985 + type: string
986 + description: The name of the chart.
987 + cnart_context:
988 + type: string
989 + description: The context of the chart. It is shared across multiple monitored
990 + software or hardware instances and used in alarm templates.
991 + family:
992 + type: string
993 + description: The family of the chart.
994 + host:
995 + type: string
996 + description: The host containing the chart.
997 + chart_variables:
998 + type: object
999 + additionalProperties:
1000 + $ref: "#/components/schemas/chart_variables"
1001 + family_variables:
1002 + type: object
1003 + properties:
1004 + varname1:
1005 + type: number
1006 + format: float
1007 + varname2:
1008 + type: number
1009 + format: float
1010 + host_variables:
1011 + type: object
1012 + properties:
1013 + varname1:
1014 + type: number
1015 + format: float
1016 + varname2:
1017 + type: number
1018 + format: float
1019 + chart_variables:
1020 + type: object
1021 + properties:
1022 + varname1:
1023 + type: number
1024 + format: float
1025 + varname2:
1026 + type: number
1027 + format: float
1028 + data:
1029 + type: object
1030 + discriminator:
1031 + propertyName: format
1032 + description: Response will contain the appropriate subtype, e.g. data_json depending
1033 + on the requested format.
1034 + properties:
1035 + api:
1036 + type: number
1037 + description: The API version this conforms to, currently 1.
1038 + id:
1039 + type: string
1040 + description: The unique id of the chart.
1041 + name:
1042 + type: string
1043 + description: The name of the chart.
1044 + update_every:
1045 + type: number
1046 + description: The update frequency of this chart, in seconds. One value every this
1047 + amount of time is kept in the round robin database (indepedently of
1048 + the current view).
1049 + view_update_every:
1050 + type: number
1051 + description: The current view appropriate update frequency of this chart, in
1052 + seconds. There is no point to request chart refreshes, using the
1053 + same settings, more frequently than this.
1054 + first_entry:
1055 + type: number
1056 + description: The UNIX timestamp of the first entry (the oldest) in the round
1057 + robin database (indepedently of the current view).
1058 + last_entry:
1059 + type: number
1060 + description: The UNIX timestamp of the latest entry in the round robin database
1061 + (indepedently of the current view).
1062 + after:
1063 + type: number
1064 + description: The UNIX timestamp of the first entry (the oldest) returned in this
1065 + response.
1066 + before:
1067 + type: number
1068 + description: The UNIX timestamp of the latest entry returned in this response.
1069 + min:
1070 + type: number
1071 + description: The minimum value returned in the current view. This can be used to
1072 + size the y-series of the chart.
1073 + max:
1074 + type: number
1075 + description: The maximum value returned in the current view. This can be used to
1076 + size the y-series of the chart.
1077 + dimension_names:
1078 + description: The dimension names of the chart as returned in the current view.
1079 + type: array
1080 + items:
1081 + type: string
1082 + dimension_ids:
1083 + description: The dimension IDs of the chart as returned in the current view.
1084 + type: array
1085 + items:
1086 + type: string
1087 + latest_values:
1088 + description: The latest values collected for the chart (indepedently of the
1089 + current view).
1090 + type: array
1091 + items:
1092 + type: string
1093 + view_latest_values:
1094 + description: The latest values returned with this response.
1095 + type: array
1096 + items:
1097 + type: string
1098 + dimensions:
1099 + type: number
1100 + description: The number of dimensions returned.
1101 + points:
1102 + type: number
1103 + description: The number of rows / points returned.
1104 + format:
1105 + type: string
1106 + description: The format of the result returned.
1107 + chart_variables:
1108 + type: object
1109 + additionalProperties:
1110 + $ref: "#/components/schemas/chart_variables"
1111 + data_json:
1112 + description: Data response in json format.
1113 + allOf:
1114 + - $ref: "#/components/schemas/data"
1115 + - properties:
1116 + result:
1117 + type: object
1118 + properties:
1119 + labels:
1120 + description: The dimensions retrieved from the chart.
1121 + type: array
1122 + items:
1123 + type: string
1124 + data:
1125 + description: The data requested, one element per sample with each element
1126 + containing the values of the dimensions described in the
1127 + labels value.
1128 + type: array
1129 + items:
1130 + type: number
1131 + description: The result requested, in the format requested.
1132 + data_flat:
1133 + description: Data response in csv / tsv / tsv-excel / ssv / ssv-comma / markdown /
1134 + html formats.
1135 + allOf:
1136 + - $ref: "#/components/schemas/data"
1137 + - properties:
1138 + result:
1139 + type: string
1140 + data_array:
1141 + description: Data response in array format.
1142 + allOf:
1143 + - $ref: "#/components/schemas/data"
1144 + - properties:
1145 + result:
1146 + type: array
1147 + items:
1148 type: number
1137 - alarm_log_entry:
1138 - type: object
1139 - properties:
1140 - hostname:
1141 - type: string
1142 - unique_id:
1143 - type: integer
1144 - format: int32
1145 - alarm_id:
1146 - type: integer
1147 - format: int32
1148 - alarm_event_id:
1149 - type: integer
1150 - format: int32
1151 - name:
1152 - type: string
1153 - chart:
1154 - type: string
1155 - family:
1156 - type: string
1157 - processed:
1158 - type: boolean
1159 - updated:
1160 - type: boolean
1161 - exec_run:
1162 - type: integer
1163 - format: int32
1164 - exec_failed:
1165 - type: boolean
1166 - exec:
1167 - type: string
1168 - recipient:
1169 - type: string
1170 - exec_code:
1171 - type: integer
1172 - format: int32
1173 - source:
1174 - type: string
1175 - units:
1176 - type: string
1177 - when:
1178 - type: integer
1179 - format: int32
1180 - duration:
1181 - type: integer
1182 - format: int32
1183 - non_clear_duration:
1184 - type: integer
1185 - format: int32
1186 - status:
1187 - type: string
1188 - old_status:
1189 - type: string
1190 - delay:
1191 - type: integer
1192 - format: int32
1193 - delay_up_to_timestamp:
1194 - type: integer
1195 - format: int32
1196 - updated_by_id:
1197 - type: integer
1198 - format: int32
1199 - updates_id:
1200 - type: integer
1201 - format: int32
1202 - value_string:
1203 - type: string
1204 - old_value_string:
1205 - type: string
1206 - silenced:
1207 - type: string
1208 - info:
1209 - type: string
1210 - value:
1211 - type: number
1212 - nullable: 'true'
1213 - old_value:
1214 - type: number
1215 - nullable: 'true'
1149 + data_csvjsonarray:
1150 + description: Data response in csvjsonarray format.
1151 + allOf:
1152 + - $ref: "#/components/schemas/data"
1153 + - properties:
1154 + result:
1155 + description: The first inner array contains strings showing the labels of
1156 + each column, each subsequent array contains the values for each
1157 + point in time.
1158 + type: array
1159 + items:
1160 + type: array
1161 + items: {}
1162 + data_datatable:
1163 + description: Data response in datatable / datasource formats (suitable for Google
1164 + Charts).
1165 + allOf:
1166 + - $ref: "#/components/schemas/data"
1167 + - properties:
1168 + result:
1169 + type: object
1170 + properties:
1171 + cols:
1172 + type: array
1173 + items:
1174 + type: object
1175 + properties:
1176 + id:
1177 + description: Always empty - for future use.
1178 + label:
1179 + description: The dimension returned from the chart.
1180 + pattern:
1181 + description: Always empty - for future use.
1182 + type:
1183 + description: The type of data in the column / chart-dimension.
1184 + p:
1185 + description: Contains any annotations for the column.
1186 + required:
1187 + - id
1188 + - label
1189 + - pattern
1190 + - type
1191 + rows:
1192 + type: array
1193 + items:
1194 + type: object
1195 + properties:
1196 + c:
1197 + type: array
1198 + items:
1199 + properties:
1200 + v:
1201 + description: "Each value in the row is represented by an
1202 + object named `c` with five v fields: data, null,
1203 + null, 0, the value. This format is fixed by the
1204 + Google Charts API."
1205 + alarms:
1206 + type: object
1207 + properties:
1208 + hostname:
1209 + type: string
1210 + latest_alarm_log_unique_id:
1211 + type: integer
1212 + format: int32
1213 + status:
1214 + type: boolean
1215 + now:
1216 + type: integer
1217 + format: int32
1218 + alarms:
1219 + type: object
1220 + properties:
1221 + chart-name.alarm-name:
1222 + type: object
1223 + properties:
1224 + id:
1225 + type: integer
1226 + format: int32
1227 + name:
1228 + type: string
1229 + description: Full alarm name.
1230 + chart:
1231 + type: string
1232 + family:
1233 + type: string
1234 + active:
1235 + type: boolean
1236 + description: Will be false only if the alarm is disabled in the
1237 + configuration.
1238 + disabled:
1239 + type: boolean
1240 + description: Whether the health check for this alarm has been disabled
1241 + via a health command API DISABLE command.
1242 + silenced:
1243 + type: boolean
1244 + description: Whether notifications for this alarm have been silenced via
1245 + a health command API SILENCE command.
1246 + exec:
1247 + type: string
1248 + recipient:
1249 + type: string
1250 + source:
1251 + type: string
1252 + units:
1253 + type: string
1254 + info:
1255 + type: string
1256 + status:
1257 + type: string
1258 + last_status_change:
1259 + type: integer
1260 + format: int32
1261 + last_updated:
1262 + type: integer
1263 + format: int32
1264 + next_update:
1265 + type: integer
1266 + format: int32
1267 + update_every:
1268 + type: integer
1269 + format: int32
1270 + delay_up_duration:
1271 + type: integer
1272 + format: int32
1273 + delay_down_duration:
1274 + type: integer
1275 + format: int32
1276 + delay_max_duration:
1277 + type: integer
1278 + format: int32
1279 + delay_multiplier:
1280 + type: integer
1281 + format: int32
1282 + delay:
1283 + type: integer
1284 + format: int32
1285 + delay_up_to_timestamp:
1286 + type: integer
1287 + format: int32
1288 + value_string:
1289 + type: string
1290 + no_clear_notification:
1291 + type: boolean
1292 + lookup_dimensions:
1293 + type: string
1294 + db_after:
1295 + type: integer
1296 + format: int32
1297 + db_before:
1298 + type: integer
1299 + format: int32
1300 + lookup_method:
1301 + type: string
1302 + lookup_after:
1303 + type: integer
1304 + format: int32
1305 + lookup_before:
1306 + type: integer
1307 + format: int32
1308 + lookup_options:
1309 + type: string
1310 + calc:
1311 + type: string
1312 + calc_parsed:
1313 + type: string
1314 + warn:
1315 + type: string
1316 + warn_parsed:
1317 + type: string
1318 + crit:
1319 + type: string
1320 + crit_parsed:
1321 + type: string
1322 + warn_repeat_every:
1323 + type: integer
1324 + format: int32
1325 + crit_repeat_every:
1326 + type: integer
1327 + format: int32
1328 + green:
1329 + type: string
1330 + format: nullable
1331 + red:
1332 + type: string
1333 + format: nullable
1334 + value:
1335 + type: number
1336 + alarm_log_entry:
1337 + type: object
1338 + properties:
1339 + hostname:
1340 + type: string
1341 + unique_id:
1342 + type: integer
1343 + format: int32
1344 + alarm_id:
1345 + type: integer
1346 + format: int32
1347 + alarm_event_id:
1348 + type: integer
1349 + format: int32
1350 + name:
1351 + type: string
1352 + chart:
1353 + type: string
1354 + family:
1355 + type: string
1356 + processed:
1357 + type: boolean
1358 + updated:
1359 + type: boolean
1360 + exec_run:
1361 + type: integer
1362 + format: int32
1363 + exec_failed:
1364 + type: boolean
1365 + exec:
1366 + type: string
1367 + recipient:
1368 + type: string
1369 + exec_code:
1370 + type: integer
1371 + format: int32
1372 + source:
1373 + type: string
1374 + units:
1375 + type: string
1376 + when:
1377 + type: integer
1378 + format: int32
1379 + duration:
1380 + type: integer
1381 + format: int32
1382 + non_clear_duration:
1383 + type: integer
1384 + format: int32
1385 + status:
1386 + type: string
1387 + old_status:
1388 + type: string
1389 + delay:
1390 + type: integer
1391 + format: int32
1392 + delay_up_to_timestamp:
1393 + type: integer
1394 + format: int32
1395 + updated_by_id:
1396 + type: integer
1397 + format: int32
1398 + updates_id:
1399 + type: integer
1400 + format: int32
1401 + value_string:
1402 + type: string
1403 + old_value_string:
1404 + type: string
1405 + silenced:
1406 + type: string
1407 + info:
1408 + type: string
1409 + value:
1410 + type: number
1411 + nullable: true
1412 + old_value:
1413 + type: number
1414 + nullable: true