@cryptotaxi247 / netdata-1 / commits / 844181013

Update /charts at API definition.

Simon Nagl committed Feb 12, 2017 at 09:21 UTC 844181013e4d4f62ec84bffa3a2f3cd66bfd96c0
2 files changed +100 -3
web/netdata-swagger.json
+70 -1
@@ -3,7 +3,7 @@
3 "info": {
4 "title": "NetData API",
5 "description": "Real time data collection and graphs...",
6 - "version": "1.4.1_master"
6 + "version": "1.5.1_rolling"
7 },
8 "host": "registry.my-netdata.io",
9 "schemes": [
@@ -396,6 +396,34 @@
396 }
397 }
398 }
399 + },
400 + "/allmetrics": {
401 + "get": {
402 + "summary": "Get a value of all the metrics maintained by netdata",
403 + "description": "The charts endpoint returns the latest value of all charts and dimensions stored in the netdata server.",
404 + "parameters": [
405 + {
406 + "name": "format",
407 + "in": "query",
408 + "description": "The format of the response to be returned",
409 + "required": true,
410 + "type": "string",
411 + "enum": [
412 + "shell",
413 + "prometheus"
414 + ],
415 + "default": "shell"
416 + }
417 + ],
418 + "responses": {
419 + "200": {
420 + "description": "All the metrics returned in the format requested"
421 + },
422 + "400": {
423 + "description": "The format requested is not supported"
424 + }
425 + }
426 + }
427 }
428 },
429 "definitions": {
@@ -406,6 +434,23 @@
434 "type": "string",
435 "description": "The hostname of the netdata server."
436 },
437 + "version": {
438 + "type": "string",
439 + "description": "netdata version of the server."
440 + },
441 + "os": {
442 + "type": "string",
443 + "description": "The netdata server host operating system.",
444 + "enum": [
445 + "macos",
446 + "linux",
447 + "freebsd"
448 + ]
449 + },
450 + "history": {
451 + "type": "number",
452 + "description": "The duration, in seconds, of the round robin database maintained by netdata."
453 + },
454 "update_every": {
455 "type": "number",
456 "description": "The default update frequency of the netdata server. All charts have an update frequency equal or bigger than this."
@@ -418,6 +463,22 @@
463 "$ref": "#/definitions/chart"
464 }
465 }
466 + },
467 + "charts_count": {
468 + "type": "number",
469 + "description": "The number of charts."
470 + },
471 + "dimensions_count": {
472 + "type": "number",
473 + "description": "The total number of dimensions."
474 + },
475 + "alarms_count": {
476 + "type": "number",
477 + "description": "The number of alarms."
478 + },
479 + "rrd_memory_bytes": {
480 + "type": "number",
481 + "description": "The size of the round robin database in bytes."
482 }
483 }
484 },
@@ -493,6 +554,14 @@
554 "$ref": "#/definitions/dimension"
555 }
556 }
557 + },
558 + "green": {
559 + "type": "number",
560 + "description": "Chart health green threshold"
561 + },
562 + "red": {
563 + "type": "number",
564 + "description": "Chart health red trheshold"
565 }
566 }
567 },
web/netdata-swagger.yaml
+30 -2
@@ -2,7 +2,7 @@ swagger: '2.0'
2 info:
3 title: NetData API
4 description: 'Real time data collection and graphs...'
5 - version: 1.4.1_master
5 + version: 1.5.1_rolling
6 host: registry.my-netdata.io
7 schemes:
8 - http
@@ -283,6 +283,16 @@ definitions:
283 hostname:
284 type: string
285 description: 'The hostname of the netdata server.'
286 + version:
287 + type: string
288 + description: 'netdata version of the server.'
289 + os:
290 + type: string
291 + description: 'The netdata server host operating system.'
292 + enum: [ 'macos', 'linux', 'freebsd' ]
293 + history:
294 + type: number
295 + description: 'The duration, in seconds, of the round robin database maintained by netdata.'
296 update_every:
297 type: number
298 description: 'The default update frequency of the netdata server. All charts have an update frequency equal or bigger than this.'
@@ -292,6 +302,18 @@ definitions:
302 properties:
303 key:
304 $ref: '#/definitions/chart'
305 + charts_count:
306 + type: number
307 + description: 'The number of charts.'
308 + dimensions_count:
309 + type: number
310 + description: 'The total number of dimensions.'
311 + alarms_count:
312 + type: number
313 + description: 'The number of alarms.'
314 + rrd_memory_bytes:
315 + type: number
316 + description: 'The size of the round robin database in bytes.'
317 chart:
318 type: object
319 properties:
@@ -344,13 +366,19 @@ definitions:
366 properties:
367 key:
368 $ref: '#/definitions/dimension'
369 + green:
370 + type: number
371 + description: 'Chart health green threshold'
372 + red:
373 + type: number
374 + description: 'Chart health red trheshold'
375 dimension:
376 type: object
377 properties:
378 name:
379 type: string
380 description: 'The name of the dimension'
353 -
381 +
382 json_wrap:
383 type: object
384 properties: