netdata-swagger.yaml 122 KB

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