nicolargo / glances

Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
http://nicolargo.github.io/glances/
Other
26.43k stars 1.5k forks source link

Doc for 'alert' Restfull/JSON API response #1994

Closed 17Halbe closed 2 years ago

17Halbe commented 2 years ago

Is your feature request related to a problem? Please describe. The alert plugin Restfull/JSON API response is undocumented and/or not in line with the rest of the responses. It is missing the 'key' values Describe the solution you'd like Preferably: Adding Key values; else please document the response.

Additional context The current response looks like:

[
  1642961040,
  1642961256,
  "WARNING",
  "MEM",
  88.70418062659719,
  82.54486757324095,
  80.62008918458108,
  5613.0509949803845,
  68,
  [],
  "",
  "memory_percent"
]

Explaining those values to me, or where to find an answer to my question, would be greatly appreciated!

nicolargo commented 2 years ago

Hi @17Halbe !

you are right. There is a whole in the documentation.

A a quick respond, the list returned by the API contents the following fields:

  ["begin",
   "end",
   "WARNING|CRITICAL",
   "CPU|LOAD|MEM",
   MAX, AVG, MIN, SUM, COUNT,
   [top3 process list],
   "Processes description",
   "top sort key"]

With:

17Halbe commented 2 years ago

Thanks a lot!