netdata-swagger.yaml 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546
  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. paths:
  7. /info:
  8. get:
  9. summary: Get netdata basic information
  10. description: |
  11. The info endpoint returns basic information about netdata. It provides:
  12. * netdata version
  13. * netdata unique id
  14. * list of hosts mirrored (includes itself)
  15. * Operating System, Virtualization and Container technology information
  16. * List of active collector plugins and modules
  17. * number of alarms in the host
  18. * number of alarms in normal state
  19. * number of alarms in warning state
  20. * number of alarms in critical state
  21. responses:
  22. "200":
  23. description: netdata basic information.
  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
  33. description: The charts endpoint returns a summary about all charts stored in the
  34. netdata server.
  35. responses:
  36. "200":
  37. description: An array of charts.
  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
  45. description: The Chart endpoint returns detailed information about a chart.
  46. parameters:
  47. - name: chart
  48. in: query
  49. description: The id of the chart as returned by the /charts call.
  50. required: true
  51. schema:
  52. type: string
  53. format: as returned by /charts
  54. default: system.cpu
  55. responses:
  56. "200":
  57. description: A javascript object with detailed information about the chart.
  58. content:
  59. application/json:
  60. schema:
  61. $ref: "#/components/schemas/chart"
  62. "400":
  63. description: No chart id was supplied in the request.
  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
  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
  77. schema:
  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.
  91. "404":
  92. description: No chart with the given id is found.
  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
  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
  106. allowEmptyValue: false
  107. schema:
  108. type: string
  109. format: as returned by /charts
  110. default: system.cpu
  111. - name: dimension
  112. in: query
  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
  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
  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
  134. allowEmptyValue: false
  135. schema:
  136. type: number
  137. format: integer
  138. default: -600
  139. - name: before
  140. in: query
  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
  149. schema:
  150. type: number
  151. format: integer
  152. default: 0
  153. - name: points
  154. in: query
  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
  160. allowEmptyValue: false
  161. schema:
  162. type: number
  163. format: integer
  164. default: 20
  165. - name: group
  166. in: query
  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
  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
  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
  192. allowEmptyValue: false
  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
  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
  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
  251. description: For JSONP responses, the callback function name.
  252. required: false
  253. allowEmptyValue: true
  254. schema:
  255. type: string
  256. - name: filename
  257. in: query
  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
  262. allowEmptyValue: true
  263. schema:
  264. type: string
  265. - name: tqx
  266. in: query
  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
  271. allowEmptyValue: true
  272. schema:
  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.
  287. "404":
  288. description: No chart with the given id is found.
  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 badge in form of SVG image for a chart (or dimension)
  295. description: Successful responses are SVG images.
  296. parameters:
  297. - name: chart
  298. in: query
  299. description: The id of the chart as returned by the /charts call.
  300. required: true
  301. allowEmptyValue: false
  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
  310. allowEmptyValue: true
  311. schema:
  312. type: string
  313. format: any text
  314. - name: dimension
  315. in: query
  316. description: Zero, one or more dimension ids, as returned by the /chart call.
  317. required: false
  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
  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
  335. allowEmptyValue: false
  336. schema:
  337. type: number
  338. format: integer
  339. default: -600
  340. - name: before
  341. in: query
  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
  351. schema:
  352. type: number
  353. format: integer
  354. default: 0
  355. - name: group
  356. in: query
  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
  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
  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
  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
  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 side(left side) of the badge. One of predefined colors or specific color in hex `RGB` or `RRGGBB` format (without preceding `#` character). If value wrong or not given default color will be used.
  414. required: false
  415. allowEmptyValue: true
  416. schema:
  417. oneOf:
  418. - type: string
  419. enum:
  420. - green
  421. - brightgreen
  422. - yellow
  423. - yellowgreen
  424. - orange
  425. - red
  426. - blue
  427. - grey
  428. - gray
  429. - lightgrey
  430. - lightgray
  431. - type: string
  432. format: ^([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
  433. - name: value_color
  434. in: query
  435. description: "A color to be used for the background of the value *(right)* part of badge. You can set
  436. multiple using a pipe with a condition each, like this:
  437. `color<value|color:null` The following operators are
  438. supported: >, <, >=, <=, =, :null (to check if no value exists). Each color can be specified in same manner as for `label_color` parameter.
  439. Currently only integers are suported as values."
  440. required: false
  441. allowEmptyValue: true
  442. schema:
  443. type: string
  444. format: any text
  445. - name: text_color_lbl
  446. in: query
  447. description: Font color for label *(left)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceeding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.
  448. required: false
  449. allowEmptyValue: true
  450. schema:
  451. oneOf:
  452. - type: string
  453. enum:
  454. - green
  455. - brightgreen
  456. - yellow
  457. - yellowgreen
  458. - orange
  459. - red
  460. - blue
  461. - grey
  462. - gray
  463. - lightgrey
  464. - lightgray
  465. - type: string
  466. format: ^([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
  467. - name: text_color_val
  468. in: query
  469. description: Font color for value *(right)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceeding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.
  470. required: false
  471. allowEmptyValue: true
  472. schema:
  473. oneOf:
  474. - type: string
  475. enum:
  476. - green
  477. - brightgreen
  478. - yellow
  479. - yellowgreen
  480. - orange
  481. - red
  482. - blue
  483. - grey
  484. - gray
  485. - lightgrey
  486. - lightgray
  487. - type: string
  488. format: ^([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
  489. - name: multiply
  490. in: query
  491. description: Multiply the value with this number for rendering it at the image
  492. (integer value required).
  493. required: false
  494. allowEmptyValue: true
  495. schema:
  496. type: number
  497. format: integer
  498. - name: divide
  499. in: query
  500. description: Divide the value with this number for rendering it at the image
  501. (integer value required).
  502. required: false
  503. allowEmptyValue: true
  504. schema:
  505. type: number
  506. format: integer
  507. - name: scale
  508. in: query
  509. description: Set the scale of the badge (greater or equal to 100).
  510. required: false
  511. allowEmptyValue: true
  512. schema:
  513. type: number
  514. format: integer
  515. - name: fixed_width_lbl
  516. in: query
  517. description: This parameter overrides auto-sizing of badge and creates it with fixed width. This parameter determines the size of the label's left side *(label/name)*. You must set this parameter together with `fixed_width_val` otherwise it will be ignored. You should set the label/value widths wide enough to provide space for all the possible values/contents of the badge you're requesting. In case the text cannot fit the space given it will be clipped. The `scale` parameter still applies on the values you give to `fixed_width_lbl` and `fixed_width_val`.
  518. required: false
  519. allowEmptyValue: false
  520. schema:
  521. type: number
  522. format: integer
  523. - name: fixed_width_val
  524. in: query
  525. description: This parameter overrides auto-sizing of badge and creates it with fixed width. This parameter determines the size of the label's right side *(value)*. You must set this parameter together with `fixed_width_lbl` otherwise it will be ignored. You should set the label/value widths wide enough to provide space for all the possible values/contents of the badge you're requesting. In case the text cannot fit the space given it will be clipped. The `scale` parameter still applies on the values you give to `fixed_width_lbl` and `fixed_width_val`.
  526. required: false
  527. allowEmptyValue: false
  528. schema:
  529. type: number
  530. format: integer
  531. responses:
  532. "200":
  533. description: The call was successful. The response should be an SVG image.
  534. "400":
  535. description: Bad request - the body will include a message stating what is wrong.
  536. "404":
  537. description: No chart with the given id is found.
  538. "500":
  539. description: Internal server error. This usually means the server is out of
  540. memory.
  541. /allmetrics:
  542. get:
  543. summary: Get a value of all the metrics maintained by netdata
  544. description: The allmetrics endpoint returns the latest value of all charts and
  545. dimensions stored in the netdata server.
  546. parameters:
  547. - name: format
  548. in: query
  549. description: The format of the response to be returned.
  550. required: true
  551. schema:
  552. type: string
  553. enum:
  554. - shell
  555. - prometheus
  556. - prometheus_all_hosts
  557. - json
  558. default: shell
  559. - name: variables
  560. in: query
  561. description: When enabled, netdata will expose various system
  562. configuration metrics.
  563. required: false
  564. schema:
  565. type: string
  566. enum:
  567. - yes
  568. - no
  569. default: no
  570. - name: help
  571. in: query
  572. description: Enable or disable HELP lines in prometheus output.
  573. required: false
  574. schema:
  575. type: string
  576. enum:
  577. - yes
  578. - no
  579. default: no
  580. - name: types
  581. in: query
  582. description: Enable or disable TYPE lines in prometheus output.
  583. required: false
  584. schema:
  585. type: string
  586. enum:
  587. - yes
  588. - no
  589. default: no
  590. - name: timestamps
  591. in: query
  592. description: Enable or disable timestamps in prometheus output.
  593. required: false
  594. schema:
  595. type: string
  596. enum:
  597. - yes
  598. - no
  599. default: yes
  600. - name: names
  601. in: query
  602. description: When enabled netdata will report dimension names. When disabled
  603. netdata will report dimension IDs. The default is controlled in
  604. netdata.conf.
  605. required: false
  606. schema:
  607. type: string
  608. enum:
  609. - yes
  610. - no
  611. default: yes
  612. - name: oldunits
  613. in: query
  614. description: When enabled, netdata will show metric names for the default
  615. source=average as they appeared before 1.12, by using the legacy
  616. unit naming conventions.
  617. required: false
  618. schema:
  619. type: string
  620. enum:
  621. - yes
  622. - no
  623. default: yes
  624. - name: hideunits
  625. in: query
  626. description: When enabled, netdata will not include the units in the metric
  627. names, for the default source=average.
  628. required: false
  629. schema:
  630. type: string
  631. enum:
  632. - yes
  633. - no
  634. default: yes
  635. - name: server
  636. in: query
  637. description: Set a distinct name of the client querying prometheus metrics.
  638. Netdata will use the client IP if this is not set.
  639. required: false
  640. schema:
  641. type: string
  642. format: any text
  643. - name: prefix
  644. in: query
  645. description: Prefix all prometheus metrics with this string.
  646. required: false
  647. schema:
  648. type: string
  649. format: any text
  650. - name: data
  651. in: query
  652. description: Select the prometheus response data source. There is a setting in
  653. netdata.conf for the default.
  654. required: false
  655. schema:
  656. type: string
  657. enum:
  658. - as-collected
  659. - average
  660. - sum
  661. default: average
  662. responses:
  663. "200":
  664. description: All the metrics returned in the format requested.
  665. "400":
  666. description: The format requested is not supported.
  667. /alarms:
  668. get:
  669. summary: Get a list of active or raised alarms on the server
  670. description: The alarms endpoint returns the list of all raised or enabled alarms on
  671. the netdata server. Called without any parameters, the raised alarms in
  672. state WARNING or CRITICAL are returned. By passing "?all", all the
  673. enabled alarms are returned.
  674. parameters:
  675. - name: all
  676. in: query
  677. description: If passed, all enabled alarms are returned.
  678. required: false
  679. allowEmptyValue: true
  680. schema:
  681. type: boolean
  682. - name: active
  683. in: query
  684. description: If passed, the raised alarms in state WARNING or CRITICAL are returned.
  685. required: false
  686. allowEmptyValue: true
  687. schema:
  688. type: boolean
  689. responses:
  690. "200":
  691. description: An object containing general info and a linked list of alarms.
  692. content:
  693. application/json:
  694. schema:
  695. $ref: "#/components/schemas/alarms"
  696. /alarms_values:
  697. get:
  698. summary: Get a list of active or raised alarms on the server
  699. description: The alarms_values endpoint returns the list of all raised or enabled alarms on
  700. the netdata server. Called without any parameters, the raised alarms in
  701. state WARNING or CRITICAL are returned. By passing "?all", all the
  702. enabled alarms are returned.
  703. This option output differs from `/alarms` in the number of variables delivered. This endpoint gives
  704. to user `id`, `value` and alarm `status`.
  705. parameters:
  706. - name: all
  707. in: query
  708. description: If passed, all enabled alarms are returned.
  709. required: false
  710. allowEmptyValue: true
  711. schema:
  712. type: boolean
  713. - name: active
  714. in: query
  715. description: If passed, the raised alarms in state WARNING or CRITICAL are returned.
  716. required: false
  717. allowEmptyValue: true
  718. schema:
  719. type: boolean
  720. responses:
  721. "200":
  722. description: An object containing general info and a linked list of alarms.
  723. content:
  724. application/json:
  725. schema:
  726. $ref: "#/components/schemas/alarms_values"
  727. /alarm_log:
  728. get:
  729. summary: Retrieves the entries of the alarm log
  730. description: Returns an array of alarm_log entries, with historical information on
  731. raised and cleared alarms.
  732. parameters:
  733. - name: after
  734. in: query
  735. description: Passing the parameter after=UNIQUEID returns all the events in the
  736. alarm log that occurred after UNIQUEID. An automated series of calls
  737. would call the interface once without after=, store the last
  738. UNIQUEID of the returned set, and give it back to get incrementally
  739. the next events.
  740. required: false
  741. schema:
  742. type: integer
  743. responses:
  744. "200":
  745. description: An array of alarm log entries.
  746. content:
  747. application/json:
  748. schema:
  749. type: array
  750. items:
  751. $ref: "#/components/schemas/alarm_log_entry"
  752. /alarm_count:
  753. get:
  754. summary: Get an overall status of the chart
  755. description: Checks multiple charts with the same context and counts number of alarms
  756. with given status.
  757. parameters:
  758. - in: query
  759. name: context
  760. description: Specify context which should be checked.
  761. required: false
  762. allowEmptyValue: true
  763. schema:
  764. type: array
  765. items:
  766. type: string
  767. default:
  768. - system.cpu
  769. - in: query
  770. name: status
  771. description: Specify alarm status to count.
  772. required: false
  773. allowEmptyValue: true
  774. schema:
  775. type: string
  776. enum:
  777. - REMOVED
  778. - UNDEFINED
  779. - UNINITIALIZED
  780. - CLEAR
  781. - RAISED
  782. - WARNING
  783. - CRITICAL
  784. default: RAISED
  785. responses:
  786. "200":
  787. description: An object containing a count of alarms with given status for given
  788. contexts.
  789. content:
  790. application/json:
  791. schema:
  792. type: array
  793. items:
  794. type: number
  795. "500":
  796. description: Internal server error. This usually means the server is out of
  797. memory.
  798. /manage/health:
  799. get:
  800. summary: Accesses the health management API to control health checks and
  801. notifications at runtime.
  802. description: Available from Netdata v1.12 and above, protected via bearer
  803. authorization. Especially useful for maintenance periods, the API allows
  804. you to disable health checks completely, silence alarm notifications, or
  805. Disable/Silence specific alarms that match selectors on alarm/template
  806. name, chart, context, host and family. For the simple disable/silence
  807. all scenaria, only the cmd parameter is required. The other parameters
  808. are used to define alarm selectors. For more information and examples,
  809. refer to the netdata documentation.
  810. parameters:
  811. - name: cmd
  812. in: query
  813. description: "DISABLE ALL: No alarm criteria are evaluated, nothing is written in
  814. the alarm log. SILENCE ALL: No notifications are sent. RESET: Return
  815. to the default state. DISABLE/SILENCE: Set the mode to be used for
  816. the alarms matching the criteria of the alarm selectors. LIST: Show
  817. active configuration."
  818. required: false
  819. schema:
  820. type: string
  821. enum:
  822. - DISABLE ALL
  823. - SILENCE ALL
  824. - DISABLE
  825. - SILENCE
  826. - RESET
  827. - LIST
  828. - name: alarm
  829. in: query
  830. description: The expression provided will match both `alarm` and `template` names.
  831. schema:
  832. type: string
  833. - name: chart
  834. in: query
  835. description: Chart ids/names, as shown on the dashboard. These will match the
  836. `on` entry of a configured `alarm`.
  837. schema:
  838. type: string
  839. - name: context
  840. in: query
  841. description: Chart context, as shown on the dashboard. These will match the `on`
  842. entry of a configured `template`.
  843. schema:
  844. type: string
  845. - name: hosts
  846. in: query
  847. description: The hostnames that will need to match.
  848. schema:
  849. type: string
  850. - name: families
  851. in: query
  852. description: The alarm families.
  853. schema:
  854. type: string
  855. responses:
  856. "200":
  857. description: A plain text response based on the result of the command.
  858. "403":
  859. description: Bearer authentication error.
  860. servers:
  861. - url: https://registry.my-netdata.io/api/v1
  862. - url: http://registry.my-netdata.io/api/v1
  863. components:
  864. schemas:
  865. info:
  866. type: object
  867. properties:
  868. version:
  869. type: string
  870. description: netdata version of the server.
  871. example: 1.11.1_rolling
  872. uid:
  873. type: string
  874. description: netdata unique id of the server.
  875. example: 24e9fe3c-f2ac-11e8-bafc-0242ac110002
  876. mirrored_hosts:
  877. type: array
  878. description: List of hosts mirrored of the server (include itself).
  879. items:
  880. type: string
  881. example:
  882. - host1.example.com
  883. - host2.example.com
  884. os_name:
  885. type: string
  886. description: Operating System Name.
  887. example: Manjaro Linux
  888. os_id:
  889. type: string
  890. description: Operating System ID.
  891. example: manjaro
  892. os_id_like:
  893. type: string
  894. description: Known OS similar to this OS.
  895. example: arch
  896. os_version:
  897. type: string
  898. description: Operating System Version.
  899. example: 18.0.4
  900. os_version_id:
  901. type: string
  902. description: Operating System Version ID.
  903. example: unknown
  904. os_detection:
  905. type: string
  906. description: OS parameters detection method.
  907. example: Mixed
  908. kernel_name:
  909. type: string
  910. description: Kernel Name.
  911. example: Linux
  912. kernel_version:
  913. type: string
  914. description: Kernel Version.
  915. example: 4.19.32-1-MANJARO
  916. architecture:
  917. type: string
  918. description: Kernel architecture.
  919. example: x86_64
  920. virtualization:
  921. type: string
  922. description: Virtualization Type.
  923. example: kvm
  924. virt_detection:
  925. type: string
  926. description: Virtualization detection method.
  927. example: systemd-detect-virt
  928. container:
  929. type: string
  930. description: Container technology.
  931. example: docker
  932. container_detection:
  933. type: string
  934. description: Container technology detection method.
  935. example: dockerenv
  936. labels:
  937. type: object
  938. description: List of host labels.
  939. properties:
  940. app:
  941. type: string
  942. description: Host label.
  943. example: netdata
  944. collectors:
  945. type: array
  946. items:
  947. type: object
  948. description: Array of collector plugins and modules.
  949. properties:
  950. plugin:
  951. type: string
  952. description: Collector plugin.
  953. example: python.d.plugin
  954. module:
  955. type: string
  956. description: Module of the collector plugin.
  957. example: dockerd
  958. alarms:
  959. type: object
  960. description: Number of alarms in the server.
  961. properties:
  962. normal:
  963. type: integer
  964. description: Number of alarms in normal state.
  965. warning:
  966. type: integer
  967. description: Number of alarms in warning state.
  968. critical:
  969. type: integer
  970. description: Number of alarms in critical state.
  971. chart_summary:
  972. type: object
  973. properties:
  974. hostname:
  975. type: string
  976. description: The hostname of the netdata server.
  977. version:
  978. type: string
  979. description: netdata version of the server.
  980. release_channel:
  981. type: string
  982. description: The release channel of the build on the server.
  983. example: nightly
  984. timezone:
  985. type: string
  986. description: The current timezone on the server.
  987. os:
  988. type: string
  989. description: The netdata server host operating system.
  990. enum:
  991. - macos
  992. - linux
  993. - freebsd
  994. history:
  995. type: number
  996. description: The duration, in seconds, of the round robin database maintained by
  997. netdata.
  998. memory_mode:
  999. type: string
  1000. description: The name of the database memory mode on the server.
  1001. update_every:
  1002. type: number
  1003. description: The default update frequency of the netdata server. All charts have
  1004. an update frequency equal or bigger than this.
  1005. charts:
  1006. type: object
  1007. description: An object containing all the chart objects available at the netdata
  1008. server. This is used as an indexed array. The key of each chart
  1009. object is the id of the chart.
  1010. additionalProperties:
  1011. $ref: "#/components/schemas/chart"
  1012. charts_count:
  1013. type: number
  1014. description: The number of charts.
  1015. dimensions_count:
  1016. type: number
  1017. description: The total number of dimensions.
  1018. alarms_count:
  1019. type: number
  1020. description: The number of alarms.
  1021. rrd_memory_bytes:
  1022. type: number
  1023. description: The size of the round robin database in bytes.
  1024. chart:
  1025. type: object
  1026. properties:
  1027. id:
  1028. type: string
  1029. description: The unique id of the chart.
  1030. name:
  1031. type: string
  1032. description: The name of the chart.
  1033. type:
  1034. type: string
  1035. description: The type of the chart. Types are not handled by netdata. You can use
  1036. this field for anything you like.
  1037. family:
  1038. type: string
  1039. description: The family of the chart. Families are not handled by netdata. You
  1040. can use this field for anything you like.
  1041. title:
  1042. type: string
  1043. description: The title of the chart.
  1044. priority:
  1045. type: number
  1046. description: The relative priority of the chart. NetData does not care about
  1047. priorities. This is just an indication of importance for the chart
  1048. viewers to sort charts of higher priority (lower number) closer to
  1049. the top. Priority sorting should only be used among charts of the
  1050. same type or family.
  1051. enabled:
  1052. type: boolean
  1053. description: True when the chart is enabled. Disabled charts do not currently
  1054. collect values, but they may have historical values available.
  1055. units:
  1056. type: string
  1057. description: The unit of measurement for the values of all dimensions of the
  1058. chart.
  1059. data_url:
  1060. type: string
  1061. description: The absolute path to get data values for this chart. You are
  1062. expected to use this path as the base when constructing the URL to
  1063. fetch data values for this chart.
  1064. chart_type:
  1065. type: string
  1066. description: The chart type.
  1067. enum:
  1068. - line
  1069. - area
  1070. - stacked
  1071. duration:
  1072. type: number
  1073. description: The duration, in seconds, of the round robin database maintained by
  1074. netdata.
  1075. first_entry:
  1076. type: number
  1077. description: The UNIX timestamp of the first entry (the oldest) in the round
  1078. robin database.
  1079. last_entry:
  1080. type: number
  1081. description: The UNIX timestamp of the latest entry in the round robin database.
  1082. update_every:
  1083. type: number
  1084. description: The update frequency of this chart, in seconds. One value every this
  1085. amount of time is kept in the round robin database.
  1086. dimensions:
  1087. type: object
  1088. description: "An object containing all the chart dimensions available for the
  1089. chart. This is used as an indexed array. For each pair in the
  1090. dictionary: the key is the id of the dimension and the value is a
  1091. dictionary containing the name."
  1092. additionalProperties:
  1093. type: object
  1094. properties:
  1095. name:
  1096. type: string
  1097. description: The name of the dimension
  1098. chart_variables:
  1099. type: object
  1100. additionalProperties:
  1101. $ref: "#/components/schemas/chart_variables"
  1102. green:
  1103. type: number
  1104. nullable: true
  1105. description: Chart health green threshold.
  1106. red:
  1107. type: number
  1108. nullable: true
  1109. description: Chart health red threshold.
  1110. alarm_variables:
  1111. type: object
  1112. properties:
  1113. chart:
  1114. type: string
  1115. description: The unique id of the chart.
  1116. chart_name:
  1117. type: string
  1118. description: The name of the chart.
  1119. cnart_context:
  1120. type: string
  1121. description: The context of the chart. It is shared across multiple monitored
  1122. software or hardware instances and used in alarm templates.
  1123. family:
  1124. type: string
  1125. description: The family of the chart.
  1126. host:
  1127. type: string
  1128. description: The host containing the chart.
  1129. chart_variables:
  1130. type: object
  1131. additionalProperties:
  1132. $ref: "#/components/schemas/chart_variables"
  1133. family_variables:
  1134. type: object
  1135. properties:
  1136. varname1:
  1137. type: number
  1138. format: float
  1139. varname2:
  1140. type: number
  1141. format: float
  1142. host_variables:
  1143. type: object
  1144. properties:
  1145. varname1:
  1146. type: number
  1147. format: float
  1148. varname2:
  1149. type: number
  1150. format: float
  1151. chart_variables:
  1152. type: object
  1153. properties:
  1154. varname1:
  1155. type: number
  1156. format: float
  1157. varname2:
  1158. type: number
  1159. format: float
  1160. data:
  1161. type: object
  1162. discriminator:
  1163. propertyName: format
  1164. description: Response will contain the appropriate subtype, e.g. data_json depending
  1165. on the requested format.
  1166. properties:
  1167. api:
  1168. type: number
  1169. description: The API version this conforms to, currently 1.
  1170. id:
  1171. type: string
  1172. description: The unique id of the chart.
  1173. name:
  1174. type: string
  1175. description: The name of the chart.
  1176. update_every:
  1177. type: number
  1178. description: The update frequency of this chart, in seconds. One value every this
  1179. amount of time is kept in the round robin database (indepedently of
  1180. the current view).
  1181. view_update_every:
  1182. type: number
  1183. description: The current view appropriate update frequency of this chart, in
  1184. seconds. There is no point to request chart refreshes, using the
  1185. same settings, more frequently than this.
  1186. first_entry:
  1187. type: number
  1188. description: The UNIX timestamp of the first entry (the oldest) in the round
  1189. robin database (indepedently of the current view).
  1190. last_entry:
  1191. type: number
  1192. description: The UNIX timestamp of the latest entry in the round robin database
  1193. (indepedently of the current view).
  1194. after:
  1195. type: number
  1196. description: The UNIX timestamp of the first entry (the oldest) returned in this
  1197. response.
  1198. before:
  1199. type: number
  1200. description: The UNIX timestamp of the latest entry returned in this response.
  1201. min:
  1202. type: number
  1203. description: The minimum value returned in the current view. This can be used to
  1204. size the y-series of the chart.
  1205. max:
  1206. type: number
  1207. description: The maximum value returned in the current view. This can be used to
  1208. size the y-series of the chart.
  1209. dimension_names:
  1210. description: The dimension names of the chart as returned in the current view.
  1211. type: array
  1212. items:
  1213. type: string
  1214. dimension_ids:
  1215. description: The dimension IDs of the chart as returned in the current view.
  1216. type: array
  1217. items:
  1218. type: string
  1219. latest_values:
  1220. description: The latest values collected for the chart (indepedently of the
  1221. current view).
  1222. type: array
  1223. items:
  1224. type: string
  1225. view_latest_values:
  1226. description: The latest values returned with this response.
  1227. type: array
  1228. items:
  1229. type: string
  1230. dimensions:
  1231. type: number
  1232. description: The number of dimensions returned.
  1233. points:
  1234. type: number
  1235. description: The number of rows / points returned.
  1236. format:
  1237. type: string
  1238. description: The format of the result returned.
  1239. chart_variables:
  1240. type: object
  1241. additionalProperties:
  1242. $ref: "#/components/schemas/chart_variables"
  1243. data_json:
  1244. description: Data response in json format.
  1245. allOf:
  1246. - $ref: "#/components/schemas/data"
  1247. - properties:
  1248. result:
  1249. type: object
  1250. properties:
  1251. labels:
  1252. description: The dimensions retrieved from the chart.
  1253. type: array
  1254. items:
  1255. type: string
  1256. data:
  1257. description: The data requested, one element per sample with each element
  1258. containing the values of the dimensions described in the
  1259. labels value.
  1260. type: array
  1261. items:
  1262. type: number
  1263. description: The result requested, in the format requested.
  1264. data_flat:
  1265. description: Data response in csv / tsv / tsv-excel / ssv / ssv-comma / markdown /
  1266. html formats.
  1267. allOf:
  1268. - $ref: "#/components/schemas/data"
  1269. - properties:
  1270. result:
  1271. type: string
  1272. data_array:
  1273. description: Data response in array format.
  1274. allOf:
  1275. - $ref: "#/components/schemas/data"
  1276. - properties:
  1277. result:
  1278. type: array
  1279. items:
  1280. type: number
  1281. data_csvjsonarray:
  1282. description: Data response in csvjsonarray format.
  1283. allOf:
  1284. - $ref: "#/components/schemas/data"
  1285. - properties:
  1286. result:
  1287. description: The first inner array contains strings showing the labels of
  1288. each column, each subsequent array contains the values for each
  1289. point in time.
  1290. type: array
  1291. items:
  1292. type: array
  1293. items: {}
  1294. data_datatable:
  1295. description: Data response in datatable / datasource formats (suitable for Google
  1296. Charts).
  1297. allOf:
  1298. - $ref: "#/components/schemas/data"
  1299. - properties:
  1300. result:
  1301. type: object
  1302. properties:
  1303. cols:
  1304. type: array
  1305. items:
  1306. type: object
  1307. properties:
  1308. id:
  1309. description: Always empty - for future use.
  1310. label:
  1311. description: The dimension returned from the chart.
  1312. pattern:
  1313. description: Always empty - for future use.
  1314. type:
  1315. description: The type of data in the column / chart-dimension.
  1316. p:
  1317. description: Contains any annotations for the column.
  1318. required:
  1319. - id
  1320. - label
  1321. - pattern
  1322. - type
  1323. rows:
  1324. type: array
  1325. items:
  1326. type: object
  1327. properties:
  1328. c:
  1329. type: array
  1330. items:
  1331. properties:
  1332. v:
  1333. description: "Each value in the row is represented by an
  1334. object named `c` with five v fields: data, null,
  1335. null, 0, the value. This format is fixed by the
  1336. Google Charts API."
  1337. alarms:
  1338. type: object
  1339. properties:
  1340. hostname:
  1341. type: string
  1342. latest_alarm_log_unique_id:
  1343. type: integer
  1344. format: int32
  1345. status:
  1346. type: boolean
  1347. now:
  1348. type: integer
  1349. format: int32
  1350. alarms:
  1351. type: object
  1352. properties:
  1353. chart-name.alarm-name:
  1354. type: object
  1355. properties:
  1356. id:
  1357. type: integer
  1358. format: int32
  1359. name:
  1360. type: string
  1361. description: Full alarm name.
  1362. chart:
  1363. type: string
  1364. family:
  1365. type: string
  1366. active:
  1367. type: boolean
  1368. description: Will be false only if the alarm is disabled in the
  1369. configuration.
  1370. disabled:
  1371. type: boolean
  1372. description: Whether the health check for this alarm has been disabled
  1373. via a health command API DISABLE command.
  1374. silenced:
  1375. type: boolean
  1376. description: Whether notifications for this alarm have been silenced via
  1377. a health command API SILENCE command.
  1378. exec:
  1379. type: string
  1380. recipient:
  1381. type: string
  1382. source:
  1383. type: string
  1384. units:
  1385. type: string
  1386. info:
  1387. type: string
  1388. status:
  1389. type: string
  1390. last_status_change:
  1391. type: integer
  1392. format: int32
  1393. last_updated:
  1394. type: integer
  1395. format: int32
  1396. next_update:
  1397. type: integer
  1398. format: int32
  1399. update_every:
  1400. type: integer
  1401. format: int32
  1402. delay_up_duration:
  1403. type: integer
  1404. format: int32
  1405. delay_down_duration:
  1406. type: integer
  1407. format: int32
  1408. delay_max_duration:
  1409. type: integer
  1410. format: int32
  1411. delay_multiplier:
  1412. type: integer
  1413. format: int32
  1414. delay:
  1415. type: integer
  1416. format: int32
  1417. delay_up_to_timestamp:
  1418. type: integer
  1419. format: int32
  1420. value_string:
  1421. type: string
  1422. no_clear_notification:
  1423. type: boolean
  1424. lookup_dimensions:
  1425. type: string
  1426. db_after:
  1427. type: integer
  1428. format: int32
  1429. db_before:
  1430. type: integer
  1431. format: int32
  1432. lookup_method:
  1433. type: string
  1434. lookup_after:
  1435. type: integer
  1436. format: int32
  1437. lookup_before:
  1438. type: integer
  1439. format: int32
  1440. lookup_options:
  1441. type: string
  1442. calc:
  1443. type: string
  1444. calc_parsed:
  1445. type: string
  1446. warn:
  1447. type: string
  1448. warn_parsed:
  1449. type: string
  1450. crit:
  1451. type: string
  1452. crit_parsed:
  1453. type: string
  1454. warn_repeat_every:
  1455. type: integer
  1456. format: int32
  1457. crit_repeat_every:
  1458. type: integer
  1459. format: int32
  1460. green:
  1461. type: string
  1462. format: nullable
  1463. red:
  1464. type: string
  1465. format: nullable
  1466. value:
  1467. type: number
  1468. alarm_log_entry:
  1469. type: object
  1470. properties:
  1471. hostname:
  1472. type: string
  1473. unique_id:
  1474. type: integer
  1475. format: int32
  1476. alarm_id:
  1477. type: integer
  1478. format: int32
  1479. alarm_event_id:
  1480. type: integer
  1481. format: int32
  1482. name:
  1483. type: string
  1484. chart:
  1485. type: string
  1486. family:
  1487. type: string
  1488. processed:
  1489. type: boolean
  1490. updated:
  1491. type: boolean
  1492. exec_run:
  1493. type: integer
  1494. format: int32
  1495. exec_failed:
  1496. type: boolean
  1497. exec:
  1498. type: string
  1499. recipient:
  1500. type: string
  1501. exec_code:
  1502. type: integer
  1503. format: int32
  1504. source:
  1505. type: string
  1506. units:
  1507. type: string
  1508. when:
  1509. type: integer
  1510. format: int32
  1511. duration:
  1512. type: integer
  1513. format: int32
  1514. non_clear_duration:
  1515. type: integer
  1516. format: int32
  1517. status:
  1518. type: string
  1519. old_status:
  1520. type: string
  1521. delay:
  1522. type: integer
  1523. format: int32
  1524. delay_up_to_timestamp:
  1525. type: integer
  1526. format: int32
  1527. updated_by_id:
  1528. type: integer
  1529. format: int32
  1530. updates_id:
  1531. type: integer
  1532. format: int32
  1533. value_string:
  1534. type: string
  1535. old_value_string:
  1536. type: string
  1537. silenced:
  1538. type: string
  1539. info:
  1540. type: string
  1541. value:
  1542. type: number
  1543. nullable: true
  1544. old_value:
  1545. type: number
  1546. nullable: true