netdata-swagger.yaml 121 KB

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