netdata-swagger.yaml 122 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261
  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. responses:
  1063. "200":
  1064. description: A plain text response based on the result of the command.
  1065. "403":
  1066. description: Bearer authentication error.
  1067. /api/v1/aclk:
  1068. get:
  1069. operationId: aclk1
  1070. tags:
  1071. - management
  1072. summary: Get information about current ACLK state
  1073. description: |
  1074. ACLK endpoint returns detailed information about current state of ACLK (Agent to Cloud communication).
  1075. responses:
  1076. "200":
  1077. description: JSON object with ACLK information.
  1078. content:
  1079. application/json:
  1080. schema:
  1081. $ref: "#/components/schemas/aclk_state"
  1082. components:
  1083. parameters:
  1084. scopeNodes:
  1085. name: scope_nodes
  1086. in: query
  1087. description: |
  1088. 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.
  1089. required: false
  1090. schema:
  1091. type: string
  1092. format: simple pattern
  1093. default: "*"
  1094. scopeContexts:
  1095. name: scope_contexts
  1096. in: query
  1097. description: |
  1098. 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.
  1099. required: false
  1100. schema:
  1101. type: string
  1102. format: simple pattern
  1103. default: "*"
  1104. filterNodes:
  1105. name: nodes
  1106. in: query
  1107. description: |
  1108. 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.
  1109. required: false
  1110. schema:
  1111. type: string
  1112. format: simple pattern
  1113. default: "*"
  1114. filterContexts:
  1115. name: contexts
  1116. in: query
  1117. description: |
  1118. 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.
  1119. required: false
  1120. schema:
  1121. type: string
  1122. format: simple pattern
  1123. default: "*"
  1124. filterInstances:
  1125. name: instances
  1126. in: query
  1127. description: |
  1128. 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.
  1129. required: false
  1130. schema:
  1131. type: string
  1132. format: simple pattern
  1133. default: "*"
  1134. filterLabels:
  1135. name: labels
  1136. in: query
  1137. description: |
  1138. 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.
  1139. required: false
  1140. schema:
  1141. type: string
  1142. format: simple pattern
  1143. default: "*"
  1144. filterAlerts:
  1145. name: alerts
  1146. in: query
  1147. description: |
  1148. 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.
  1149. required: false
  1150. schema:
  1151. type: string
  1152. format: simple pattern
  1153. default: "*"
  1154. filterDimensions:
  1155. name: dimensions
  1156. in: query
  1157. description: |
  1158. 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.
  1159. required: false
  1160. schema:
  1161. type: string
  1162. format: simple pattern
  1163. default: "*"
  1164. dataFormat1:
  1165. name: format
  1166. in: query
  1167. description: The format of the data to be returned.
  1168. allowEmptyValue: false
  1169. schema:
  1170. type: string
  1171. enum:
  1172. - json
  1173. - jsonp
  1174. - csv
  1175. - tsv
  1176. - tsv-excel
  1177. - ssv
  1178. - ssvcomma
  1179. - datatable
  1180. - datasource
  1181. - html
  1182. - markdown
  1183. - array
  1184. - csvjsonarray
  1185. default: json
  1186. dataFormat2:
  1187. name: format
  1188. in: query
  1189. description: The format of the data to be returned.
  1190. allowEmptyValue: false
  1191. schema:
  1192. type: string
  1193. enum:
  1194. - json
  1195. - json2
  1196. - jsonp
  1197. - csv
  1198. - tsv
  1199. - tsv-excel
  1200. - ssv
  1201. - ssvcomma
  1202. - datatable
  1203. - datasource
  1204. - html
  1205. - markdown
  1206. - array
  1207. - csvjsonarray
  1208. default: json2
  1209. dataQueryOptions:
  1210. name: options
  1211. in: query
  1212. description: |
  1213. Options that affect data generation.
  1214. * `jsonwrap` - Wrap the output in a JSON object with metadata about the query.
  1215. * `raw` - change the output so that it is aggregatable across multiple such queries. Supported by `/api/v2` data queries and `json2` format.
  1216. * `minify` - Remove unnecessary spaces and newlines from the output.
  1217. * `debug` - Provide additional information in `jsonwrap` output to help tracing issues.
  1218. * `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.
  1219. * `null2zero` - Replace `null` values with `0`.
  1220. * `absolute` or `abs` - Traditionally Netdata returns select dimensions negative to improve visual appearance. This option turns this feature off.
  1221. * `display-absolute` - Only used by badges, to do color calculation using the signed value, but render the value without a sign.
  1222. * `flip` or `reversed` - Order the timestamps array in reverse order (newest to oldest).
  1223. * `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.
  1224. * `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.
  1225. * `seconds` - Output timestamps in seconds instead of dates.
  1226. * `milliseconds` or `ms` - Output timestamps in milliseconds instead of dates.
  1227. * `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.
  1228. * `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.
  1229. * `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.
  1230. * `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.
  1231. * `details` - `/api/v2/data` returns in `jsonwrap` the full tree of dimensions that have been matched by the query.
  1232. * `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.
  1233. * `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.
  1234. * `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.
  1235. * `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.
  1236. * `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.
  1237. * `label-quotes` - In `csv` output format, enclose each header label in quotes.
  1238. * `objectrows` - Each row of value should be an object, not an array (only for `json` format).
  1239. * `google_json` - Comply with google JSON/JSONP specs (only for `json` format).
  1240. required: false
  1241. allowEmptyValue: false
  1242. schema:
  1243. type: array
  1244. items:
  1245. type: string
  1246. enum:
  1247. - jsonwrap
  1248. - raw
  1249. - minify
  1250. - debug
  1251. - nonzero
  1252. - null2zero
  1253. - abs
  1254. - absolute
  1255. - display-absolute
  1256. - flip
  1257. - reversed
  1258. - min2max
  1259. - percentage
  1260. - seconds
  1261. - ms
  1262. - milliseconds
  1263. - unaligned
  1264. - match-ids
  1265. - match-names
  1266. - anomaly-bit
  1267. - jw-anomaly-rates
  1268. - details
  1269. - group-by-labels
  1270. - natural-points
  1271. - virtual-points
  1272. - selected-tier
  1273. - all-dimensions
  1274. - label-quotes
  1275. - objectrows
  1276. - google_json
  1277. default:
  1278. - seconds
  1279. - jsonwrap
  1280. dataTimeGroup1:
  1281. name: group
  1282. in: query
  1283. description: |
  1284. 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.
  1285. required: false
  1286. schema:
  1287. type: string
  1288. enum:
  1289. - min
  1290. - max
  1291. - avg
  1292. - average
  1293. - median
  1294. - stddev
  1295. - sum
  1296. - incremental-sum
  1297. - ses
  1298. - des
  1299. - cv
  1300. - countif
  1301. - percentile
  1302. - percentile25
  1303. - percentile50
  1304. - percentile75
  1305. - percentile80
  1306. - percentile90
  1307. - percentile95
  1308. - percentile97
  1309. - percentile98
  1310. - percentile99
  1311. - trimmed-mean
  1312. - trimmed-mean1
  1313. - trimmed-mean2
  1314. - trimmed-mean3
  1315. - trimmed-mean5
  1316. - trimmed-mean10
  1317. - trimmed-mean15
  1318. - trimmed-mean20
  1319. - trimmed-mean25
  1320. - trimmed-median
  1321. - trimmed-median1
  1322. - trimmed-median2
  1323. - trimmed-median3
  1324. - trimmed-median5
  1325. - trimmed-median10
  1326. - trimmed-median15
  1327. - trimmed-median20
  1328. - trimmed-median25
  1329. default: average
  1330. dataTimeGroup2:
  1331. name: time_group
  1332. in: query
  1333. description: |
  1334. 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.
  1335. required: false
  1336. schema:
  1337. type: string
  1338. enum:
  1339. - min
  1340. - max
  1341. - avg
  1342. - average
  1343. - median
  1344. - stddev
  1345. - sum
  1346. - incremental-sum
  1347. - ses
  1348. - des
  1349. - cv
  1350. - countif
  1351. - percentile
  1352. - percentile25
  1353. - percentile50
  1354. - percentile75
  1355. - percentile80
  1356. - percentile90
  1357. - percentile95
  1358. - percentile97
  1359. - percentile98
  1360. - percentile99
  1361. - trimmed-mean
  1362. - trimmed-mean1
  1363. - trimmed-mean2
  1364. - trimmed-mean3
  1365. - trimmed-mean5
  1366. - trimmed-mean10
  1367. - trimmed-mean15
  1368. - trimmed-mean20
  1369. - trimmed-mean25
  1370. - trimmed-median
  1371. - trimmed-median1
  1372. - trimmed-median2
  1373. - trimmed-median3
  1374. - trimmed-median5
  1375. - trimmed-median10
  1376. - trimmed-median15
  1377. - trimmed-median20
  1378. - trimmed-median25
  1379. default: average
  1380. dataTimeGroupOptions1:
  1381. name: group_options
  1382. in: query
  1383. description: |
  1384. 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.
  1385. required: false
  1386. schema:
  1387. type: string
  1388. dataTimeGroupOptions2:
  1389. name: time_group_options
  1390. in: query
  1391. description: |
  1392. 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.
  1393. required: false
  1394. schema:
  1395. type: string
  1396. dataTimeResampling1:
  1397. name: gtime
  1398. in: query
  1399. description: |
  1400. 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).
  1401. required: false
  1402. allowEmptyValue: false
  1403. schema:
  1404. type: number
  1405. format: integer
  1406. default: 0
  1407. dataTimeResampling2:
  1408. name: time_resampling
  1409. in: query
  1410. description: |
  1411. 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.
  1412. required: false
  1413. schema:
  1414. type: number
  1415. format: integer
  1416. default: 0
  1417. timeoutMS:
  1418. name: timeout
  1419. in: query
  1420. description: |
  1421. 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.
  1422. required: false
  1423. schema:
  1424. type: number
  1425. format: integer
  1426. default: 0
  1427. timeoutSecs:
  1428. name: timeout
  1429. in: query
  1430. description: |
  1431. 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.
  1432. required: false
  1433. schema:
  1434. type: number
  1435. format: integer
  1436. default: 0
  1437. before:
  1438. name: before
  1439. in: query
  1440. description: |
  1441. `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.
  1442. required: false
  1443. schema:
  1444. type: integer
  1445. default: 0
  1446. after:
  1447. name: after
  1448. in: query
  1449. description: |
  1450. `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.
  1451. required: false
  1452. schema:
  1453. type: integer
  1454. default: -600
  1455. baselineBefore:
  1456. name: baseline_before
  1457. in: query
  1458. description: |
  1459. `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.
  1460. required: false
  1461. schema:
  1462. type: integer
  1463. default: 0
  1464. baselineAfter:
  1465. name: baseline_after
  1466. in: query
  1467. description: |
  1468. `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.
  1469. required: false
  1470. schema:
  1471. type: integer
  1472. default: -600
  1473. points:
  1474. name: points
  1475. in: query
  1476. description: |
  1477. 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).
  1478. required: false
  1479. schema:
  1480. type: number
  1481. format: integer
  1482. default: 0
  1483. tier:
  1484. name: tier
  1485. in: query
  1486. description: |
  1487. Use only the given dbengine tier for executing the query. Setting this parameters automatically sets the option `selected-tier` for the query.
  1488. required: false
  1489. schema:
  1490. type: number
  1491. format: integer
  1492. callback:
  1493. name: callback
  1494. in: query
  1495. description: |
  1496. For JSONP responses, the callback function name.
  1497. required: false
  1498. schema:
  1499. type: string
  1500. filename:
  1501. name: filename
  1502. in: query
  1503. description: |
  1504. Add `Content-Disposition: attachment; filename=` header to the response, that will instruct the browser to save the response with the given filename."
  1505. required: false
  1506. schema:
  1507. type: string
  1508. tqx:
  1509. name: tqx
  1510. in: query
  1511. description: |
  1512. [Google Visualization API](https://developers.google.com/chart/interactive/docs/dev/implementing_data_source?hl=en) formatted parameter.
  1513. required: false
  1514. schema:
  1515. type: string
  1516. contextOptions1:
  1517. name: options
  1518. in: query
  1519. description: Options that affect data generation.
  1520. required: false
  1521. schema:
  1522. type: array
  1523. items:
  1524. type: string
  1525. enum:
  1526. - full
  1527. - all
  1528. - charts
  1529. - dimensions
  1530. - labels
  1531. - uuids
  1532. - queue
  1533. - flags
  1534. - deleted
  1535. - deepscan
  1536. chart:
  1537. name: chart
  1538. in: query
  1539. description: The id of the chart as returned by the `/api/v1/charts` call.
  1540. required: false
  1541. allowEmptyValue: false
  1542. schema:
  1543. type: string
  1544. format: as returned by `/api/v1/charts`
  1545. context:
  1546. name: context
  1547. in: query
  1548. description: The context of the chart as returned by the /charts call.
  1549. required: false
  1550. allowEmptyValue: false
  1551. schema:
  1552. type: string
  1553. format: as returned by /charts
  1554. dimension:
  1555. name: dimension
  1556. in: query
  1557. description: Zero, one or more dimension ids or names, as returned by the /chart
  1558. call, separated with comma or pipe. Netdata simple patterns are
  1559. supported.
  1560. required: false
  1561. allowEmptyValue: false
  1562. schema:
  1563. type: array
  1564. items:
  1565. type: string
  1566. format: as returned by /charts
  1567. dimensions:
  1568. name: dimensions
  1569. in: query
  1570. description: a simple pattern matching dimensions (use comma or pipe as separator)
  1571. required: false
  1572. allowEmptyValue: true
  1573. schema:
  1574. type: string
  1575. chart_label_key:
  1576. name: chart_label_key
  1577. in: query
  1578. description: |
  1579. 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.
  1580. required: false
  1581. allowEmptyValue: false
  1582. schema:
  1583. type: string
  1584. format: key1,key2,key3
  1585. chart_labels_filter:
  1586. name: chart_labels_filter
  1587. in: query
  1588. description: |
  1589. 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
  1590. required: false
  1591. allowEmptyValue: false
  1592. schema:
  1593. type: string
  1594. format: key1:value1,key2:value2,key3:value3
  1595. weightMethods:
  1596. name: method
  1597. in: query
  1598. description: The weighting / scoring algorithm.
  1599. required: false
  1600. schema:
  1601. type: string
  1602. enum:
  1603. - ks2
  1604. - volume
  1605. - anomaly-rate
  1606. - value
  1607. schemas:
  1608. info:
  1609. type: object
  1610. properties:
  1611. version:
  1612. type: string
  1613. description: netdata version of the server.
  1614. example: 1.11.1_rolling
  1615. uid:
  1616. type: string
  1617. description: netdata unique id of the server.
  1618. example: 24e9fe3c-f2ac-11e8-bafc-0242ac110002
  1619. mirrored_hosts:
  1620. type: array
  1621. description: List of hosts mirrored of the server (include itself).
  1622. items:
  1623. type: string
  1624. example:
  1625. - host1.example.com
  1626. - host2.example.com
  1627. mirrored_hosts_status:
  1628. type: array
  1629. description: >-
  1630. List of details of hosts mirrored to this served (including self).
  1631. Indexes correspond to indexes in "mirrored_hosts".
  1632. items:
  1633. type: object
  1634. description: Host data
  1635. properties:
  1636. guid:
  1637. type: string
  1638. format: uuid
  1639. nullable: false
  1640. description: Host unique GUID from `netdata.public.unique.id`.
  1641. example: 245e4bff-3b34-47c1-a6e5-5c535a9abfb2
  1642. reachable:
  1643. type: boolean
  1644. nullable: false
  1645. description: Current state of streaming. Always true for localhost/self.
  1646. claim_id:
  1647. type: string
  1648. format: uuid
  1649. nullable: true
  1650. description: >-
  1651. Cloud GUID/identifier in case the host is claimed.
  1652. If child status unknown or unclaimed this field is set to `null`
  1653. example: c3b2a66a-3052-498c-ac52-7fe9e8cccb0c
  1654. os_name:
  1655. type: string
  1656. description: Operating System Name.
  1657. example: Manjaro Linux
  1658. os_id:
  1659. type: string
  1660. description: Operating System ID.
  1661. example: manjaro
  1662. os_id_like:
  1663. type: string
  1664. description: Known OS similar to this OS.
  1665. example: arch
  1666. os_version:
  1667. type: string
  1668. description: Operating System Version.
  1669. example: 18.0.4
  1670. os_version_id:
  1671. type: string
  1672. description: Operating System Version ID.
  1673. example: unknown
  1674. os_detection:
  1675. type: string
  1676. description: OS parameters detection method.
  1677. example: Mixed
  1678. kernel_name:
  1679. type: string
  1680. description: Kernel Name.
  1681. example: Linux
  1682. kernel_version:
  1683. type: string
  1684. description: Kernel Version.
  1685. example: 4.19.32-1-MANJARO
  1686. is_k8s_node:
  1687. type: boolean
  1688. description: Netdata is running on a K8s node.
  1689. example: false
  1690. architecture:
  1691. type: string
  1692. description: Kernel architecture.
  1693. example: x86_64
  1694. virtualization:
  1695. type: string
  1696. description: Virtualization Type.
  1697. example: kvm
  1698. virt_detection:
  1699. type: string
  1700. description: Virtualization detection method.
  1701. example: systemd-detect-virt
  1702. container:
  1703. type: string
  1704. description: Container technology.
  1705. example: docker
  1706. container_detection:
  1707. type: string
  1708. description: Container technology detection method.
  1709. example: dockerenv
  1710. stream_compression:
  1711. type: boolean
  1712. description: Stream transmission compression method.
  1713. example: true
  1714. labels:
  1715. type: object
  1716. description: List of host labels.
  1717. properties:
  1718. app:
  1719. type: string
  1720. description: Host label.
  1721. example: netdata
  1722. collectors:
  1723. type: array
  1724. items:
  1725. type: object
  1726. description: Array of collector plugins and modules.
  1727. properties:
  1728. plugin:
  1729. type: string
  1730. description: Collector plugin.
  1731. example: python.d.plugin
  1732. module:
  1733. type: string
  1734. description: Module of the collector plugin.
  1735. example: dockerd
  1736. alarms:
  1737. type: object
  1738. description: Number of alarms in the server.
  1739. properties:
  1740. normal:
  1741. type: integer
  1742. description: Number of alarms in normal state.
  1743. warning:
  1744. type: integer
  1745. description: Number of alarms in warning state.
  1746. critical:
  1747. type: integer
  1748. description: Number of alarms in critical state.
  1749. chart_summary:
  1750. type: object
  1751. properties:
  1752. hostname:
  1753. type: string
  1754. description: The hostname of the netdata server.
  1755. version:
  1756. type: string
  1757. description: netdata version of the server.
  1758. release_channel:
  1759. type: string
  1760. description: The release channel of the build on the server.
  1761. example: nightly
  1762. timezone:
  1763. type: string
  1764. description: The current timezone on the server.
  1765. os:
  1766. type: string
  1767. description: The netdata server host operating system.
  1768. enum:
  1769. - macos
  1770. - linux
  1771. - freebsd
  1772. history:
  1773. type: number
  1774. description: The duration, in seconds, of the round robin database maintained by
  1775. netdata.
  1776. memory_mode:
  1777. type: string
  1778. description: The name of the database memory mode on the server.
  1779. update_every:
  1780. type: number
  1781. description: The default update frequency of the netdata server. All charts have
  1782. an update frequency equal or bigger than this.
  1783. charts:
  1784. type: object
  1785. description: An object containing all the chart objects available at the netdata
  1786. server. This is used as an indexed array. The key of each chart
  1787. object is the id of the chart.
  1788. additionalProperties:
  1789. $ref: "#/components/schemas/chart"
  1790. charts_count:
  1791. type: number
  1792. description: The number of charts.
  1793. dimensions_count:
  1794. type: number
  1795. description: The total number of dimensions.
  1796. alarms_count:
  1797. type: number
  1798. description: The number of alarms.
  1799. rrd_memory_bytes:
  1800. type: number
  1801. description: The size of the round robin database in bytes.
  1802. chart:
  1803. type: object
  1804. properties:
  1805. id:
  1806. type: string
  1807. description: The unique id of the chart.
  1808. name:
  1809. type: string
  1810. description: The name of the chart.
  1811. type:
  1812. type: string
  1813. description: The type of the chart. Types are not handled by netdata. You can use
  1814. this field for anything you like.
  1815. family:
  1816. type: string
  1817. description: The family of the chart. Families are not handled by netdata. You
  1818. can use this field for anything you like.
  1819. title:
  1820. type: string
  1821. description: The title of the chart.
  1822. priority:
  1823. type: number
  1824. description: The relative priority of the chart. Netdata does not care about
  1825. priorities. This is just an indication of importance for the chart
  1826. viewers to sort charts of higher priority (lower number) closer to
  1827. the top. Priority sorting should only be used among charts of the
  1828. same type or family.
  1829. enabled:
  1830. type: boolean
  1831. description: True when the chart is enabled. Disabled charts do not currently
  1832. collect values, but they may have historical values available.
  1833. units:
  1834. type: string
  1835. description: The unit of measurement for the values of all dimensions of the
  1836. chart.
  1837. data_url:
  1838. type: string
  1839. description: The absolute path to get data values for this chart. You are
  1840. expected to use this path as the base when constructing the URL to
  1841. fetch data values for this chart.
  1842. chart_type:
  1843. type: string
  1844. description: The chart type.
  1845. enum:
  1846. - line
  1847. - area
  1848. - stacked
  1849. duration:
  1850. type: number
  1851. description: The duration, in seconds, of the round robin database maintained by
  1852. netdata.
  1853. first_entry:
  1854. type: number
  1855. description: The UNIX timestamp of the first entry (the oldest) in the round
  1856. robin database.
  1857. last_entry:
  1858. type: number
  1859. description: The UNIX timestamp of the latest entry in the round robin database.
  1860. update_every:
  1861. type: number
  1862. description: The update frequency of this chart, in seconds. One value every this
  1863. amount of time is kept in the round robin database.
  1864. dimensions:
  1865. type: object
  1866. description: |
  1867. 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."
  1868. additionalProperties:
  1869. type: object
  1870. properties:
  1871. name:
  1872. type: string
  1873. description: The name of the dimension
  1874. chart_variables:
  1875. type: object
  1876. additionalProperties:
  1877. $ref: "#/components/schemas/chart_variables"
  1878. green:
  1879. type: number
  1880. nullable: true
  1881. description: Chart health green threshold.
  1882. red:
  1883. type: number
  1884. nullable: true
  1885. description: Chart health red threshold.
  1886. context_summary:
  1887. type: object
  1888. properties:
  1889. hostname:
  1890. type: string
  1891. description: The hostname of the netdata server.
  1892. machine_guid:
  1893. type: string
  1894. description: The unique installation id of this netdata server.
  1895. node_id:
  1896. type: string
  1897. description: The unique node id of this netdata server at the hub.
  1898. example: nightly
  1899. claim_id:
  1900. type: string
  1901. description: The unique handshake id of this netdata server and the hub.
  1902. host_labels:
  1903. type: object
  1904. description: The host labels associated with this netdata server.
  1905. context:
  1906. type: object
  1907. description: "An object containing all the context objects available at the netdata server.
  1908. This is used as an indexed array. The key of each context object is the id of the context."
  1909. additionalProperties:
  1910. $ref: "#/components/schemas/context"
  1911. context:
  1912. type: object
  1913. properties:
  1914. version:
  1915. type: string
  1916. description: "The version of this context.
  1917. The number are not sequential, but bigger numbers depict a newer object."
  1918. hub_version:
  1919. type: string
  1920. description: The version of this context, as known by hub.
  1921. family:
  1922. type: string
  1923. description: "The family of the context. When multiple charts of a context have different families,
  1924. the netdata server replaces the different parts with [x], so that the context can have only one family."
  1925. title:
  1926. type: string
  1927. description: "The title of the context. When multiple charts of a context have different titles,
  1928. the netdata server replaces the different parts with [x], so that the context can have only one title."
  1929. priority:
  1930. type: number
  1931. description: "The relative priority of the context. When multiple contexts have different priorities,
  1932. the minimum among them is selected as the priority of the context."
  1933. units:
  1934. type: string
  1935. description: "The unit of measurement for the values of all dimensions of the context. If multiple charts
  1936. of context have different units, the latest collected is selected."
  1937. chart_type:
  1938. type: string
  1939. description: The chart type.
  1940. enum:
  1941. - line
  1942. - area
  1943. - stacked
  1944. first_time_t:
  1945. type: number
  1946. description: The UNIX timestamp of the first entry (the oldest) in the database.
  1947. last_time_t:
  1948. type: number
  1949. description: The UNIX timestamp of the latest entry in the database.
  1950. charts:
  1951. type: object
  1952. description: "An object containing all the charts available for the chart. This is used as an indexed array.
  1953. For each pair in the dictionary, the key is the id of the chart and the value provides all details about
  1954. the chart."
  1955. alarm_variables:
  1956. type: object
  1957. properties:
  1958. chart:
  1959. type: string
  1960. description: The unique id of the chart.
  1961. chart_name:
  1962. type: string
  1963. description: The name of the chart.
  1964. cnart_context:
  1965. type: string
  1966. description: The context of the chart. It is shared across multiple monitored
  1967. software or hardware instances and used in alarm templates.
  1968. family:
  1969. type: string
  1970. description: The family of the chart.
  1971. host:
  1972. type: string
  1973. description: The host containing the chart.
  1974. chart_variables:
  1975. type: object
  1976. additionalProperties:
  1977. $ref: "#/components/schemas/chart_variables"
  1978. family_variables:
  1979. type: object
  1980. properties:
  1981. varname1:
  1982. type: number
  1983. format: float
  1984. varname2:
  1985. type: number
  1986. format: float
  1987. host_variables:
  1988. type: object
  1989. properties:
  1990. varname1:
  1991. type: number
  1992. format: float
  1993. varname2:
  1994. type: number
  1995. format: float
  1996. chart_variables:
  1997. type: object
  1998. properties:
  1999. varname1:
  2000. type: number
  2001. format: float
  2002. varname2:
  2003. type: number
  2004. format: float
  2005. jsonwrap2:
  2006. description: |
  2007. Data response with `format=json2`
  2008. type: object
  2009. properties:
  2010. api:
  2011. $ref: '#/components/schemas/api'
  2012. agents:
  2013. $ref: '#/components/schemas/agents'
  2014. versions:
  2015. $ref: '#/components/schemas/versions'
  2016. summary:
  2017. description: |
  2018. 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.
  2019. type: object
  2020. properties:
  2021. nodes:
  2022. type: array
  2023. items:
  2024. $ref: '#/components/schemas/nodeWithDataStatistics'
  2025. contexts:
  2026. type: array
  2027. items:
  2028. type: object
  2029. description: |
  2030. An object describing a unique context. `is` stands for instances, `ds` for dimensions, `al` for alerts, `sts` for statistics.
  2031. properties:
  2032. id:
  2033. description: the context id.
  2034. type: string
  2035. is:
  2036. $ref: "#/components/schemas/jsonwrap2_items_count"
  2037. ds:
  2038. $ref: "#/components/schemas/jsonwrap2_items_count"
  2039. al:
  2040. $ref: "#/components/schemas/jsonwrap2_alerts_count"
  2041. sts:
  2042. oneOf:
  2043. - $ref: "#/components/schemas/jsonwrap2_sts"
  2044. - $ref: "#/components/schemas/jsonwrap2_sts_raw"
  2045. instances:
  2046. type: array
  2047. items:
  2048. type: object
  2049. description: |
  2050. An object describing an instance. `ds` stands for dimensions, `al` for alerts, `sts` for statistics.
  2051. properties:
  2052. id:
  2053. description: the id of the instance.
  2054. type: string
  2055. nm:
  2056. description: the name of the instance (may be absent when it is the same with the id)
  2057. type: string
  2058. ni:
  2059. 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.
  2060. ds:
  2061. $ref: "#/components/schemas/jsonwrap2_items_count"
  2062. al:
  2063. $ref: "#/components/schemas/jsonwrap2_alerts_count"
  2064. sts:
  2065. oneOf:
  2066. - $ref: "#/components/schemas/jsonwrap2_sts"
  2067. - $ref: "#/components/schemas/jsonwrap2_sts_raw"
  2068. dimensions:
  2069. type: array
  2070. items:
  2071. type: object
  2072. description: |
  2073. An object describing a unique dimension. `ds` stands for `dimensions`, `sts` for statistics.
  2074. properties:
  2075. id:
  2076. description: the id of the dimension.
  2077. type: string
  2078. nm:
  2079. description: the name of the dimension (may be absent when it is the same with the id)
  2080. type: string
  2081. ds:
  2082. $ref: "#/components/schemas/jsonwrap2_items_count"
  2083. sts:
  2084. oneOf:
  2085. - $ref: "#/components/schemas/jsonwrap2_sts"
  2086. - $ref: "#/components/schemas/jsonwrap2_sts_raw"
  2087. labels:
  2088. type: array
  2089. items:
  2090. type: object
  2091. description: |
  2092. An object describing a label key. `ds` stands for `dimensions`, `sts` for statistics.
  2093. properties:
  2094. id:
  2095. description: the key of the label.
  2096. type: string
  2097. ds:
  2098. $ref: "#/components/schemas/jsonwrap2_items_count"
  2099. sts:
  2100. oneOf:
  2101. - $ref: "#/components/schemas/jsonwrap2_sts"
  2102. - $ref: "#/components/schemas/jsonwrap2_sts_raw"
  2103. vl:
  2104. description: |
  2105. An array of values for this key.
  2106. type: array
  2107. items:
  2108. type: object
  2109. properties:
  2110. id:
  2111. description: The value string
  2112. type: string
  2113. ds:
  2114. $ref: "#/components/schemas/jsonwrap2_items_count"
  2115. sts:
  2116. oneOf:
  2117. - $ref: "#/components/schemas/jsonwrap2_sts"
  2118. - $ref: "#/components/schemas/jsonwrap2_sts_raw"
  2119. alerts:
  2120. description: |
  2121. An array of all the unique alerts running, grouped by alert name (`nm` is available here)
  2122. type: array
  2123. items:
  2124. $ref: "#/components/schemas/jsonwrap2_alerts_count"
  2125. totals:
  2126. type: object
  2127. properties:
  2128. nodes:
  2129. $ref: "#/components/schemas/jsonwrap2_items_count"
  2130. contexts:
  2131. $ref: "#/components/schemas/jsonwrap2_items_count"
  2132. instances:
  2133. $ref: "#/components/schemas/jsonwrap2_items_count"
  2134. dimensions:
  2135. $ref: "#/components/schemas/jsonwrap2_items_count"
  2136. label_keys:
  2137. $ref: "#/components/schemas/jsonwrap2_items_count"
  2138. label_key_values:
  2139. $ref: "#/components/schemas/jsonwrap2_items_count"
  2140. functions:
  2141. type: array
  2142. items:
  2143. type: string
  2144. db:
  2145. type: object
  2146. properties:
  2147. tiers:
  2148. description: |
  2149. The number of tiers this server is using.
  2150. type: integer
  2151. update_every:
  2152. description: |
  2153. The minimum update every, in seconds, for all tiers and all metrics aggregated into this query.
  2154. type: integer
  2155. first_entry:
  2156. description: |
  2157. The minimum unix epoch timestamp of the retention across all tiers for all metrics aggregated into this query.
  2158. type: integer
  2159. last_entry:
  2160. description: |
  2161. The maximum unix epoch timestamp of the retention across all tier for all metrics aggregated into this query.
  2162. type: integer
  2163. per_tier:
  2164. description: |
  2165. An array with information for each of the tiers available, related to this query.
  2166. type: array
  2167. items:
  2168. type: object
  2169. properties:
  2170. tier:
  2171. description: |
  2172. The tier number of this tier, starting at 0.
  2173. type: integer
  2174. queries:
  2175. description: |
  2176. 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.
  2177. type: integer
  2178. points:
  2179. description: |
  2180. The number of points read from this tier.
  2181. type: integer
  2182. update_every:
  2183. description: |
  2184. The minimum resolution of all metrics queried on this tier.
  2185. type: integer
  2186. first_entry:
  2187. description: |
  2188. The minimum unix epoch timestamp available across all metrics that used this tier. This reflects the oldest timestamp of the tier's retention.
  2189. type: integer
  2190. last_entry:
  2191. description: |
  2192. The maximum unix epoch timestamp available across all metrics that used this tier. This reflects the newest timestamp of the tier's retention.
  2193. units:
  2194. description: |
  2195. The units of the database data
  2196. oneOf:
  2197. - type: string
  2198. - type: array
  2199. items:
  2200. type: string
  2201. dimensions:
  2202. type: object
  2203. properties:
  2204. ids:
  2205. description: |
  2206. An array with the dimension ids that uniquely identify the dimensions for this query. It is the same with `view.dimensions.ids`.
  2207. type: array
  2208. items:
  2209. type: string
  2210. units:
  2211. description: |
  2212. An array with the units each dimension has in the database (independent of group-by aggregation that may override the units).
  2213. type: array
  2214. items:
  2215. type: string
  2216. sts:
  2217. description: |
  2218. Statistics about the data collection points used for each dimension.
  2219. oneOf:
  2220. - $ref: "#/components/schemas/jsonwrap2_sts"
  2221. - $ref: "#/components/schemas/jsonwrap2_sts_raw"
  2222. view:
  2223. type: object
  2224. properties:
  2225. title:
  2226. description: |
  2227. The title the chart should have.
  2228. type: string
  2229. format:
  2230. description: |
  2231. The format the `result` top level member has. Available on when `debug` flag is set.
  2232. type: string
  2233. options:
  2234. description: |
  2235. An array presenting all the options given to the query. Available on when `debug` flag is set.
  2236. type: array
  2237. items:
  2238. type: string
  2239. time_group:
  2240. description: |
  2241. The same as the parameter `time_group`. Available on when `debug` flag is set.
  2242. type: string
  2243. after:
  2244. description: |
  2245. The oldest unix epoch timestamp of the data returned in the `result`.
  2246. type: integer
  2247. before:
  2248. description: |
  2249. The newest unix epoch timestamp of the data returned in the `result`.
  2250. type: integer
  2251. partial_data_trimming:
  2252. description: |
  2253. Information related to trimming of the last few points of the `result`, that was required to remove (increasing) partial data.
  2254. Trimming is disabled when the `raw` option is given to the query.
  2255. This object is available only when the `debug` flag is set.
  2256. type: object
  2257. properties:
  2258. max_update_every:
  2259. description: |
  2260. The maximum `update_every` for all metrics aggregated into the query.
  2261. Trimming is by default enabled at `view.before - max_update_every`, but only when `view.before >= now - max_update_every`.
  2262. type: integer
  2263. expected_after:
  2264. description: |
  2265. The timestamp at which trimming can be enabled.
  2266. If this timestamp is greater or equal to `view.before`, there is no trimming.
  2267. type: integer
  2268. trimmed_after:
  2269. description: |
  2270. The timestamp at which trimming has been applied.
  2271. If this timestamp is greater or equal to `view.before`, there is no trimming.
  2272. points:
  2273. description: |
  2274. The number of points in `result`. Available only when `raw` is given.
  2275. type: integer
  2276. units:
  2277. description: |
  2278. The units of the query.
  2279. oneOf:
  2280. - type: string
  2281. - type: array
  2282. items:
  2283. type: string
  2284. chart_type:
  2285. description: |
  2286. The default chart type of the query.
  2287. type: string
  2288. enum:
  2289. - line
  2290. - area
  2291. - stacked
  2292. dimensions:
  2293. description: |
  2294. Detailed information about the chart dimensions included in the `result`.
  2295. type: object
  2296. properties:
  2297. grouped_by:
  2298. description: |
  2299. An array with the order of the groupings performed.
  2300. type: array
  2301. items:
  2302. type: string
  2303. enum:
  2304. - selected
  2305. - dimension
  2306. - instance
  2307. - node
  2308. - context
  2309. - units
  2310. - "label:key1"
  2311. - "label:key2"
  2312. - "label:keyN"
  2313. ids:
  2314. description: |
  2315. An array with the dimension ids that uniquely identify the dimensions for this query.
  2316. type: array
  2317. items:
  2318. type: string
  2319. names:
  2320. description: |
  2321. An array with the dimension names to be presented to users. Names may be overlapping, but IDs are not.
  2322. type: array
  2323. items:
  2324. type: string
  2325. priorities:
  2326. description: |
  2327. An array with the relative priorities of the dimensions.
  2328. Numbers may not be sequential or unique. The application is expected to order by this and then by name.
  2329. type: array
  2330. items:
  2331. type: integer
  2332. aggregated:
  2333. description: |
  2334. An array with the number of source metrics aggregated into each dimension.
  2335. type: array
  2336. items:
  2337. type: integer
  2338. units:
  2339. description: |
  2340. An array with the units each dimension has.
  2341. type: array
  2342. items:
  2343. type: string
  2344. sts:
  2345. description: |
  2346. Statistics about the view points for each dimension.
  2347. oneOf:
  2348. - $ref: "#/components/schemas/jsonwrap2_sts"
  2349. - $ref: "#/components/schemas/jsonwrap2_sts_raw"
  2350. labels:
  2351. description: |
  2352. The labels associated with each dimension in the query.
  2353. This object is only available when the `group-by-labels` option is given to the query.
  2354. type: object
  2355. properties:
  2356. label_key1:
  2357. description: |
  2358. An array having one entry for each of the dimensions of the query.
  2359. type: array
  2360. items:
  2361. description: |
  2362. An array having one entry for each of the values this label key has for the given dimension.
  2363. type: array
  2364. items:
  2365. type: string
  2366. min:
  2367. description: |
  2368. The minimum value of all points included in the `result`.
  2369. type: number
  2370. max:
  2371. description: |
  2372. The maximum value of all points included in the `result`.
  2373. type: number
  2374. result:
  2375. $ref: '#/components/schemas/data_json_formats2'
  2376. timings:
  2377. type: object
  2378. jsonwrap2_sts:
  2379. description: |
  2380. Statistical values
  2381. type: object
  2382. properties:
  2383. min:
  2384. description: The minimum value of all metrics aggregated
  2385. type: number
  2386. max:
  2387. description: The maximum value of all metrics aggregated
  2388. type: number
  2389. avg:
  2390. description: The average value of all metrics aggregated
  2391. type: number
  2392. arp:
  2393. description: The average anomaly rate of all metrics aggregated
  2394. type: number
  2395. con:
  2396. description: The contribution percentage of all the metrics aggregated
  2397. type: number
  2398. jsonwrap2_sts_raw:
  2399. description: |
  2400. Statistical values when `raw` option is given.
  2401. type: object
  2402. properties:
  2403. min:
  2404. description: The minimum value of all metrics aggregated
  2405. type: number
  2406. max:
  2407. description: The maximum value of all metrics aggregated
  2408. type: number
  2409. sum:
  2410. description: The sum value of all metrics aggregated
  2411. type: number
  2412. ars:
  2413. description: The sum anomaly rate of all metrics aggregated
  2414. type: number
  2415. vol:
  2416. description: The volume of all the metrics aggregated
  2417. type: number
  2418. cnt:
  2419. description: The count of all metrics aggregated
  2420. type: integer
  2421. jsonwrap2_items_count:
  2422. description: |
  2423. 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.
  2424. type: object
  2425. properties:
  2426. sl:
  2427. description: The number of items `selected` to query. If absent it is zero.
  2428. type: integer
  2429. ex:
  2430. description: The number of items `excluded` from querying. If absent it is zero.
  2431. type: integer
  2432. qr:
  2433. description: The number of items (out of `selected`) the query successfully `queried`. If absent it is zero.
  2434. type: integer
  2435. fl:
  2436. description: The number of items (from `selected`) that `failed` to be queried. If absent it is zero.
  2437. type: integer
  2438. jsonwrap2_alerts_count:
  2439. description: |
  2440. Counters about alert statuses. If this object is missing, it is assumed that all its members are zero.
  2441. type: object
  2442. properties:
  2443. nm:
  2444. description: The name of the alert. Can be absent when the counters refer to more than one alert instances.
  2445. type: string
  2446. cl:
  2447. description: The number of CLEAR alerts. If absent, it is zero.
  2448. type: integer
  2449. wr:
  2450. description: The number of WARNING alerts. If absent, it is zero.
  2451. type: integer
  2452. cr:
  2453. description: The number of CRITICAL alerts. If absent, it is zero.
  2454. type: integer
  2455. ot:
  2456. description: |
  2457. The number of alerts that are not CLEAR, WARNING, CRITICAL (so, they are "other"). If absent, it is zero.
  2458. type: integer
  2459. api:
  2460. description: The version of the API used.
  2461. type: integer
  2462. agents:
  2463. description: |
  2464. An array of agent definitions consulted to compose this response.
  2465. type: array
  2466. items:
  2467. type: object
  2468. properties:
  2469. mg:
  2470. description: The agent machine GUID.
  2471. type: string
  2472. format: uuid
  2473. nd:
  2474. description: The agent cloud node ID.
  2475. type: string
  2476. format: uuid
  2477. nm:
  2478. description: The agent hostname.
  2479. type: string
  2480. ai:
  2481. description: The agent index ID for this agent, in this response.
  2482. type: integer
  2483. now:
  2484. description: The current unix epoch timestamp of this agent.
  2485. type: integer
  2486. versions:
  2487. description: |
  2488. Hashes that allow the caller to detect important database changes of Netdata agents.
  2489. type: object
  2490. properties:
  2491. nodes_hard_hash:
  2492. description: |
  2493. 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.
  2494. type: integer
  2495. contexts_hard_hash:
  2496. description: |
  2497. 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.
  2498. type: integer
  2499. contexts_soft_hash:
  2500. description: |
  2501. 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.
  2502. type: integer
  2503. alerts_hard_hash:
  2504. description: |
  2505. 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.
  2506. type: integer
  2507. alerts_soft_hash:
  2508. description: |
  2509. An auto-increment value that reflects the number of alerts transitions. Everytime an alert transitions to a new state, this number gets incremented.
  2510. type: integer
  2511. nodeBasic:
  2512. type: object
  2513. description: Basic information about a node.
  2514. required:
  2515. - ni
  2516. - st
  2517. properties:
  2518. mg:
  2519. description: The machine guid of the node. May not be available if the request is served by the Netdata Cloud.
  2520. type: string
  2521. format: UUID
  2522. nd:
  2523. description: The node id of the node. May not be available if the node is not registered to Netdata Cloud.
  2524. type: string
  2525. format: UUID
  2526. nm:
  2527. description: The name (hostname) of the node.
  2528. type: string
  2529. ni:
  2530. description: The node index id, a number that uniquely identifies this node for this query.
  2531. type: integer
  2532. st:
  2533. description: Status information about the communication with this node.
  2534. type: object
  2535. properties:
  2536. ai:
  2537. description: The agent index id that has been contacted for this node.
  2538. type: integer
  2539. code:
  2540. 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.
  2541. type: integer
  2542. msg:
  2543. 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.
  2544. type: string
  2545. ms:
  2546. 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.
  2547. type: number
  2548. nodeWithDataStatistics:
  2549. allOf:
  2550. - $ref: '#/components/schemas/nodeBasic'
  2551. - type: object
  2552. description: |
  2553. `is` stands for instances, `ds` for dimensions, `al` for alerts, `sts` for statistics.
  2554. properties:
  2555. is:
  2556. $ref: "#/components/schemas/jsonwrap2_items_count"
  2557. ds:
  2558. $ref: "#/components/schemas/jsonwrap2_items_count"
  2559. al:
  2560. $ref: "#/components/schemas/jsonwrap2_alerts_count"
  2561. sts:
  2562. oneOf:
  2563. - $ref: "#/components/schemas/jsonwrap2_sts"
  2564. - $ref: "#/components/schemas/jsonwrap2_sts_raw"
  2565. nodeFull:
  2566. allOf:
  2567. - $ref: '#/components/schemas/nodeBasic'
  2568. - type: object
  2569. properties:
  2570. version:
  2571. description: The version of the Netdata Agent the node runs.
  2572. type: string
  2573. hops:
  2574. description: How many hops away from the origin node, the queried one is. 0 means the agent itself is the origin node.
  2575. type: integer
  2576. state:
  2577. description: The current state of the node on this agent.
  2578. type: string
  2579. enum:
  2580. - reachable
  2581. - stale
  2582. - offline
  2583. context2Basic:
  2584. type: object
  2585. properties:
  2586. family:
  2587. type: string
  2588. priority:
  2589. type: integer
  2590. first_entry:
  2591. type: integer
  2592. last_entry:
  2593. type: integer
  2594. live:
  2595. type: boolean
  2596. contexts2:
  2597. description: |
  2598. `/api/v2/contexts` and `/api/v2/q` response about multi-node contexts hosted by a Netdata agent.
  2599. type: object
  2600. properties:
  2601. api:
  2602. $ref: '#/components/schemas/api'
  2603. agents:
  2604. $ref: '#/components/schemas/agents'
  2605. versions:
  2606. $ref: '#/components/schemas/versions'
  2607. contexts:
  2608. additionalProperties:
  2609. $ref: '#/components/schemas/context2Basic'
  2610. jsonwrap1:
  2611. type: object
  2612. discriminator:
  2613. propertyName: format
  2614. description: Response will contain the appropriate subtype, e.g. data_json depending
  2615. on the requested format.
  2616. properties:
  2617. api:
  2618. type: number
  2619. description: The API version this conforms to.
  2620. id:
  2621. type: string
  2622. description: The unique id of the chart.
  2623. name:
  2624. type: string
  2625. description: The name of the chart.
  2626. update_every:
  2627. type: number
  2628. description: The update frequency of this chart, in seconds. One value every this
  2629. amount of time is kept in the round robin database (independently of
  2630. the current view).
  2631. view_update_every:
  2632. type: number
  2633. description: The current view appropriate update frequency of this chart, in
  2634. seconds. There is no point to request chart refreshes, using the
  2635. same settings, more frequently than this.
  2636. first_entry:
  2637. type: number
  2638. description: The UNIX timestamp of the first entry (the oldest) in the round
  2639. robin database (independently of the current view).
  2640. last_entry:
  2641. type: number
  2642. description: The UNIX timestamp of the latest entry in the round robin database
  2643. (independently of the current view).
  2644. after:
  2645. type: number
  2646. description: The UNIX timestamp of the first entry (the oldest) returned in this
  2647. response.
  2648. before:
  2649. type: number
  2650. description: The UNIX timestamp of the latest entry returned in this response.
  2651. min:
  2652. type: number
  2653. description: The minimum value returned in the current view. This can be used to
  2654. size the y-series of the chart.
  2655. max:
  2656. type: number
  2657. description: The maximum value returned in the current view. This can be used to
  2658. size the y-series of the chart.
  2659. dimension_names:
  2660. description: The dimension names of the chart as returned in the current view.
  2661. type: array
  2662. items:
  2663. type: string
  2664. dimension_ids:
  2665. description: The dimension IDs of the chart as returned in the current view.
  2666. type: array
  2667. items:
  2668. type: string
  2669. latest_values:
  2670. description: The latest values collected for the chart (independently of the
  2671. current view).
  2672. type: array
  2673. items:
  2674. type: string
  2675. view_latest_values:
  2676. description: The latest values returned with this response.
  2677. type: array
  2678. items:
  2679. type: string
  2680. dimensions:
  2681. type: number
  2682. description: The number of dimensions returned.
  2683. points:
  2684. type: number
  2685. description: The number of rows / points returned.
  2686. format:
  2687. type: string
  2688. description: The format of the result returned.
  2689. chart_variables:
  2690. type: object
  2691. additionalProperties:
  2692. $ref: '#/components/schemas/chart_variables'
  2693. result:
  2694. $ref: '#/components/schemas/data_json_formats1'
  2695. data_json_formats1:
  2696. description: |
  2697. Depending on the `format` given to a data query, any of the following may be returned.
  2698. oneOf:
  2699. - $ref: '#/components/schemas/data_json'
  2700. - $ref: '#/components/schemas/data_datatable'
  2701. - $ref: '#/components/schemas/data_csvjsonarray'
  2702. - $ref: '#/components/schemas/data_array'
  2703. - $ref: '#/components/schemas/data_txt'
  2704. data_json_formats2:
  2705. description: |
  2706. Depending on the `format` given to a data query, any of the following may be returned.
  2707. oneOf:
  2708. - $ref: '#/components/schemas/data_json2'
  2709. - $ref: '#/components/schemas/data_json_formats1'
  2710. data_json2:
  2711. type: object
  2712. properties:
  2713. labels:
  2714. description: |
  2715. The IDs of the dimensions returned. The first is always `time`.
  2716. type: array
  2717. items:
  2718. type: string
  2719. point:
  2720. description: |
  2721. The format of each point returned.
  2722. type: object
  2723. properties:
  2724. value:
  2725. description: |
  2726. The index of the value in each point.
  2727. type: integer
  2728. arp:
  2729. description: |
  2730. The index of the anomaly rate in each point.
  2731. type: integer
  2732. pa:
  2733. description: |
  2734. The index of the point annotations in each point.
  2735. This is a bitmap. `EMPTY = 1`, `RESET = 2`, `PARTIAL = 4`.
  2736. `EMPTY` means the point has no value.
  2737. `RESET` means that at least one metric aggregated experienced an overflow (a counter that wrapped).
  2738. `PARTIAL` means that this point should have more metrics aggregated into it, but not all metrics had data.
  2739. type: integer
  2740. count:
  2741. description: |
  2742. The number of metrics aggregated into this point.
  2743. This exists only when the option `raw` is given to the query and the final aggregation point is NOT `percentage`.
  2744. type: integer
  2745. hidden:
  2746. description: |
  2747. The sum of the non-selected dimensions aggregated for this group item point.
  2748. This exists only when the option `raw` is given to the query and the final aggregation method is `percentage`.
  2749. data:
  2750. type: array
  2751. items:
  2752. allOf:
  2753. - type: integer
  2754. - type: array
  2755. data_json:
  2756. description: Data response in `json` format.
  2757. type: object
  2758. properties:
  2759. labels:
  2760. description: The dimensions retrieved from the chart.
  2761. type: array
  2762. items:
  2763. type: string
  2764. data:
  2765. description: |
  2766. The data requested, one element per sample with each element containing the values of the dimensions described in the labels value.
  2767. type: array
  2768. items:
  2769. type: number
  2770. data_txt:
  2771. description: |
  2772. Data response in `csv`, `tsv`, `tsv-excel`, `ssv`, `ssv-comma`, `markdown`, `html` formats.
  2773. type: string
  2774. data_array:
  2775. description: Data response in `array` format.
  2776. type: array
  2777. items:
  2778. type: number
  2779. data_csvjsonarray:
  2780. description: |
  2781. The first inner array contains strings showing the labels of each column, each subsequent array contains the values for each point in time.
  2782. type: array
  2783. items:
  2784. type: array
  2785. items: {}
  2786. data_datatable:
  2787. description: |
  2788. Data response in datatable / datasource formats (suitable for Google Charts).
  2789. type: object
  2790. properties:
  2791. cols:
  2792. type: array
  2793. items:
  2794. type: object
  2795. properties:
  2796. id:
  2797. description: Always empty - for future use.
  2798. label:
  2799. description: The dimension returned from the chart.
  2800. pattern:
  2801. description: Always empty - for future use.
  2802. type:
  2803. description: The type of data in the column / chart-dimension.
  2804. p:
  2805. description: Contains any annotations for the column.
  2806. required:
  2807. - id
  2808. - label
  2809. - pattern
  2810. - type
  2811. rows:
  2812. type: array
  2813. items:
  2814. type: object
  2815. properties:
  2816. c:
  2817. type: array
  2818. items:
  2819. properties:
  2820. v:
  2821. description: |
  2822. 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."
  2823. alarms:
  2824. type: object
  2825. properties:
  2826. hostname:
  2827. type: string
  2828. latest_alarm_log_unique_id:
  2829. type: integer
  2830. format: int32
  2831. status:
  2832. type: boolean
  2833. now:
  2834. type: integer
  2835. format: int32
  2836. alarms:
  2837. type: object
  2838. properties:
  2839. chart-name.alarm-name:
  2840. type: object
  2841. properties:
  2842. id:
  2843. type: integer
  2844. format: int32
  2845. name:
  2846. type: string
  2847. description: Full alarm name.
  2848. chart:
  2849. type: string
  2850. family:
  2851. type: string
  2852. active:
  2853. type: boolean
  2854. description: Will be false only if the alarm is disabled in the
  2855. configuration.
  2856. disabled:
  2857. type: boolean
  2858. description: Whether the health check for this alarm has been disabled
  2859. via a health command API DISABLE command.
  2860. silenced:
  2861. type: boolean
  2862. description: Whether notifications for this alarm have been silenced via
  2863. a health command API SILENCE command.
  2864. exec:
  2865. type: string
  2866. recipient:
  2867. type: string
  2868. source:
  2869. type: string
  2870. units:
  2871. type: string
  2872. info:
  2873. type: string
  2874. status:
  2875. type: string
  2876. last_status_change:
  2877. type: integer
  2878. format: int32
  2879. last_updated:
  2880. type: integer
  2881. format: int32
  2882. next_update:
  2883. type: integer
  2884. format: int32
  2885. update_every:
  2886. type: integer
  2887. format: int32
  2888. delay_up_duration:
  2889. type: integer
  2890. format: int32
  2891. delay_down_duration:
  2892. type: integer
  2893. format: int32
  2894. delay_max_duration:
  2895. type: integer
  2896. format: int32
  2897. delay_multiplier:
  2898. type: integer
  2899. format: int32
  2900. delay:
  2901. type: integer
  2902. format: int32
  2903. delay_up_to_timestamp:
  2904. type: integer
  2905. format: int32
  2906. value_string:
  2907. type: string
  2908. no_clear_notification:
  2909. type: boolean
  2910. lookup_dimensions:
  2911. type: string
  2912. db_after:
  2913. type: integer
  2914. format: int32
  2915. db_before:
  2916. type: integer
  2917. format: int32
  2918. lookup_method:
  2919. type: string
  2920. lookup_after:
  2921. type: integer
  2922. format: int32
  2923. lookup_before:
  2924. type: integer
  2925. format: int32
  2926. lookup_options:
  2927. type: string
  2928. calc:
  2929. type: string
  2930. calc_parsed:
  2931. type: string
  2932. warn:
  2933. type: string
  2934. warn_parsed:
  2935. type: string
  2936. crit:
  2937. type: string
  2938. crit_parsed:
  2939. type: string
  2940. warn_repeat_every:
  2941. type: integer
  2942. format: int32
  2943. crit_repeat_every:
  2944. type: integer
  2945. format: int32
  2946. green:
  2947. type: string
  2948. format: nullable
  2949. red:
  2950. type: string
  2951. format: nullable
  2952. value:
  2953. type: number
  2954. alarm_log_entry:
  2955. type: object
  2956. properties:
  2957. hostname:
  2958. type: string
  2959. unique_id:
  2960. type: integer
  2961. format: int32
  2962. alarm_id:
  2963. type: integer
  2964. format: int32
  2965. alarm_event_id:
  2966. type: integer
  2967. format: int32
  2968. name:
  2969. type: string
  2970. chart:
  2971. type: string
  2972. family:
  2973. type: string
  2974. processed:
  2975. type: boolean
  2976. updated:
  2977. type: boolean
  2978. exec_run:
  2979. type: integer
  2980. format: int32
  2981. exec_failed:
  2982. type: boolean
  2983. exec:
  2984. type: string
  2985. recipient:
  2986. type: string
  2987. exec_code:
  2988. type: integer
  2989. format: int32
  2990. source:
  2991. type: string
  2992. units:
  2993. type: string
  2994. when:
  2995. type: integer
  2996. format: int32
  2997. duration:
  2998. type: integer
  2999. format: int32
  3000. non_clear_duration:
  3001. type: integer
  3002. format: int32
  3003. status:
  3004. type: string
  3005. old_status:
  3006. type: string
  3007. delay:
  3008. type: integer
  3009. format: int32
  3010. delay_up_to_timestamp:
  3011. type: integer
  3012. format: int32
  3013. updated_by_id:
  3014. type: integer
  3015. format: int32
  3016. updates_id:
  3017. type: integer
  3018. format: int32
  3019. value_string:
  3020. type: string
  3021. old_value_string:
  3022. type: string
  3023. silenced:
  3024. type: string
  3025. info:
  3026. type: string
  3027. value:
  3028. type: number
  3029. nullable: true
  3030. old_value:
  3031. type: number
  3032. nullable: true
  3033. alarms_values:
  3034. type: object
  3035. properties:
  3036. hostname:
  3037. type: string
  3038. alarms:
  3039. type: object
  3040. description: HashMap with keys being alarm names
  3041. additionalProperties:
  3042. type: object
  3043. properties:
  3044. id:
  3045. type: integer
  3046. value:
  3047. type: integer
  3048. last_updated:
  3049. type: integer
  3050. format: int32
  3051. status:
  3052. type: string
  3053. enum:
  3054. - REMOVED
  3055. - UNDEFINED
  3056. - UNINITIALIZED
  3057. - CLEAR
  3058. - RAISED
  3059. - WARNING
  3060. - CRITICAL
  3061. - UNKNOWN
  3062. aclk_state:
  3063. type: object
  3064. properties:
  3065. aclk-available:
  3066. type: string
  3067. description: |
  3068. 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.
  3069. aclk-version:
  3070. type: integer
  3071. description: Describes which ACLK version is currently used.
  3072. protocols-supported:
  3073. type: array
  3074. description: List of supported protocols for communication with Cloud.
  3075. items:
  3076. type: string
  3077. agent-claimed:
  3078. type: boolean
  3079. description: Informs whether this agent has been added to a space in the cloud (User has to perform claiming).
  3080. If false (user didn't perform claiming) agent will never attempt any cloud connection.
  3081. claimed_id:
  3082. type: string
  3083. format: uuid
  3084. description: Unique ID this agent uses to identify when connecting to cloud
  3085. online:
  3086. type: boolean
  3087. description: Informs if this agent was connected to the cloud at the time this request has been processed.
  3088. used-cloud-protocol:
  3089. type: string
  3090. description: Informs which protocol is used to communicate with cloud
  3091. enum:
  3092. - Old
  3093. - New
  3094. metric_correlations:
  3095. type: object
  3096. properties:
  3097. after:
  3098. description: the start time of the highlighted window
  3099. type: integer
  3100. before:
  3101. description: the end time of the highlighted window
  3102. type: integer
  3103. duration:
  3104. description: the duration of the highlighted window
  3105. type: integer
  3106. points:
  3107. description: the points of the highlighted window
  3108. type: integer
  3109. baseline_after:
  3110. description: the start time of the baseline window
  3111. type: integer
  3112. baseline_before:
  3113. description: the end time of the baseline window
  3114. type: integer
  3115. baseline_duration:
  3116. description: the duration of the baseline window
  3117. type: integer
  3118. baseline_points:
  3119. description: the points of the baseline window
  3120. type: integer
  3121. group:
  3122. description: the grouping method across time
  3123. type: string
  3124. method:
  3125. description: the correlation method used
  3126. type: string
  3127. options:
  3128. description: a comma separated list of the query options set
  3129. type: string
  3130. correlated_dimensions:
  3131. description: the number of dimensions returned in the result
  3132. total_dimensions_count:
  3133. description: the total number of dimensions evaluated
  3134. type: integer
  3135. statistics:
  3136. type: object
  3137. properties:
  3138. query_time_ms:
  3139. type: number
  3140. db_queries:
  3141. type: integer
  3142. db_points_read:
  3143. type: integer
  3144. query_result_points:
  3145. type: integer
  3146. binary_searches:
  3147. type: integer
  3148. correlated_charts:
  3149. type: object
  3150. description: An object containing chart objects with their metrics correlations.
  3151. properties:
  3152. chart-id1:
  3153. type: object
  3154. properties:
  3155. context:
  3156. type: string
  3157. dimensions:
  3158. type: object
  3159. properties:
  3160. dimension1-name:
  3161. type: number
  3162. dimension2-name:
  3163. type: number
  3164. chart-id2:
  3165. type: object
  3166. properties:
  3167. context:
  3168. type: string
  3169. dimensions:
  3170. type: object
  3171. properties:
  3172. dimension1-name:
  3173. type: number
  3174. dimension2-name:
  3175. type: number
  3176. weights2:
  3177. type: object
  3178. weights:
  3179. type: object
  3180. properties:
  3181. after:
  3182. description: the start time of the highlighted window
  3183. type: integer
  3184. before:
  3185. description: the end time of the highlighted window
  3186. type: integer
  3187. duration:
  3188. description: the duration of the highlighted window
  3189. type: integer
  3190. points:
  3191. description: the points of the highlighted window
  3192. type: integer
  3193. baseline_after:
  3194. description: the start time of the baseline window
  3195. type: integer
  3196. baseline_before:
  3197. description: the end time of the baseline window
  3198. type: integer
  3199. baseline_duration:
  3200. description: the duration of the baseline window
  3201. type: integer
  3202. baseline_points:
  3203. description: the points of the baseline window
  3204. type: integer
  3205. group:
  3206. description: the grouping method across time
  3207. type: string
  3208. method:
  3209. description: the correlation method used
  3210. type: string
  3211. options:
  3212. description: a comma separated list of the query options set
  3213. type: string
  3214. correlated_dimensions:
  3215. description: the number of dimensions returned in the result
  3216. total_dimensions_count:
  3217. description: the total number of dimensions evaluated
  3218. type: integer
  3219. statistics:
  3220. type: object
  3221. properties:
  3222. query_time_ms:
  3223. type: number
  3224. db_queries:
  3225. type: integer
  3226. db_points_read:
  3227. type: integer
  3228. query_result_points:
  3229. type: integer
  3230. binary_searches:
  3231. type: integer
  3232. contexts:
  3233. description: A dictionary of weighted context objects.
  3234. type: object
  3235. additionalProperties:
  3236. $ref: '#/components/schemas/weighted_context'
  3237. weighted_context:
  3238. type: object
  3239. properties:
  3240. weight:
  3241. description: The average weight of the context.
  3242. type: number
  3243. charts:
  3244. description: A dictionary of weighted chart objects.
  3245. type: object
  3246. additionalProperties:
  3247. $ref: '#/components/schemas/weighted_chart'
  3248. weighted_chart:
  3249. type: object
  3250. properties:
  3251. weight:
  3252. description: The average weight of the context.
  3253. type: number
  3254. dimensions:
  3255. description: A dictionary of weighted dimensions.
  3256. type: object
  3257. additionalProperties:
  3258. $ref: '#/components/schemas/weighted_dimension'
  3259. weighted_dimension:
  3260. type: number