api.rst 39.5 KB
Newer Older
A
Alessio Sergi 已提交
1 2
.. _api:

N
nicolargo 已提交
3 4
API (Restfull/JSON) documentation
=================================
A
Alessio Sergi 已提交
5

N
nicolargo 已提交
6
The Glances Restfull/API server could be ran using the following command line:
A
Alessio Sergi 已提交
7

N
nicolargo 已提交
8
.. code-block:: bash
A
Alessio Sergi 已提交
9

N
nicolargo 已提交
10 11 12 13 14 15 16
    # glances -w --disable-webui

Note: Change request URL api/3 by api/2 if you use Glances 2.x.

GET Plugins list
----------------

N
nicolargo 已提交
17
.. code-block:: json
N
nicolargo 已提交
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55

    # curl http://localhost:61208/api/3/pluginslist
    ['alert',
     'amps',
     'cloud',
     'connections',
     'core',
     'cpu',
     'diskio',
     'docker',
     'folders',
     'fs',
     'gpu',
     'help',
     'ip',
     'irq',
     'load',
     'mem',
     'memswap',
     'network',
     'now',
     'percpu',
     'ports',
     'processcount',
     'processlist',
     'psutilversion',
     'quicklook',
     'raid',
     'sensors',
     'smart',
     'system',
     'uptime',
     'wifi']


GET alert
---------

N
nicolargo 已提交
56
Get the plugins list::
N
nicolargo 已提交
57 58

    # curl http://localhost:61208/api/3/alert
N
nicolargo 已提交
59
    [[1626507830.0,
N
nicolargo 已提交
60 61 62
      -1,
      'WARNING',
      'MEM',
N
nicolargo 已提交
63 64 65 66
      75.6720721190852,
      75.6720721190852,
      75.6720721190852,
      75.6720721190852,
N
nicolargo 已提交
67 68 69 70 71 72 73 74
      1,
      [],
      '',
      'memory_percent']]

GET amps
--------

N
nicolargo 已提交
75
Get the plugins list::
N
nicolargo 已提交
76 77 78 79 80 81 82 83 84 85

    # curl http://localhost:61208/api/3/amps
    [{'count': 0,
      'countmax': None,
      'countmin': 1.0,
      'key': 'name',
      'name': 'Dropbox',
      'refresh': 3.0,
      'regex': True,
      'result': None,
N
nicolargo 已提交
86
      'timer': 0.11265683174133301},
N
nicolargo 已提交
87 88 89 90 91 92 93 94
     {'count': 0,
      'countmax': 20.0,
      'countmin': None,
      'key': 'name',
      'name': 'Python',
      'refresh': 3.0,
      'regex': True,
      'result': None,
N
nicolargo 已提交
95
      'timer': 0.11254549026489258}]
N
nicolargo 已提交
96

N
nicolargo 已提交
97
Get a specific field::
N
nicolargo 已提交
98 99 100
    # curl http://localhost:61208/api/3/amps/name
    {'name': ['Dropbox', 'Python', 'Conntrack', 'Nginx', 'Systemd', 'SystemV']}

N
nicolargo 已提交
101
Get a specific item when field matchs the given value::
N
nicolargo 已提交
102 103 104 105 106 107 108 109 110
    # curl http://localhost:61208/api/3/amps/name/Dropbox
    {'Dropbox': [{'count': 0,
                  'countmax': None,
                  'countmin': 1.0,
                  'key': 'name',
                  'name': 'Dropbox',
                  'refresh': 3.0,
                  'regex': True,
                  'result': None,
N
nicolargo 已提交
111
                  'timer': 0.11265683174133301}]}
N
nicolargo 已提交
112 113 114 115

GET core
--------

N
nicolargo 已提交
116
Get the plugins list::
N
nicolargo 已提交
117 118 119 120 121 122 123 124 125

    # curl http://localhost:61208/api/3/core
    {'log': 4, 'phys': 2}

Fields descriptions:

* **phys**: Number of physical cores (hyper thread CPUs are excluded) (unit is *number*)
* **log**: Number of logical CPUs. A logical CPU is the number of physical cores multiplied by the number of threads that can run on each core (unit is *number*)

N
nicolargo 已提交
126
Get a specific field::
N
nicolargo 已提交
127 128 129 130 131 132
    # curl http://localhost:61208/api/3/core/phys
    {'phys': 2}

GET cpu
-------

N
nicolargo 已提交
133
Get the plugins list::
N
nicolargo 已提交
134 135 136 137 138 139

    # curl http://localhost:61208/api/3/cpu
    {'cpucore': 4,
     'ctx_switches': 0,
     'guest': 0.0,
     'guest_nice': 0.0,
N
nicolargo 已提交
140
     'idle': 68.6,
N
nicolargo 已提交
141 142 143 144 145
     'interrupts': 0,
     'iowait': 0.0,
     'irq': 0.0,
     'nice': 0.0,
     'soft_interrupts': 0,
N
nicolargo 已提交
146
     'softirq': 5.0,
N
nicolargo 已提交
147 148
     'steal': 0.0,
     'syscalls': 0,
N
nicolargo 已提交
149
     'system': 5.0,
N
nicolargo 已提交
150
     'time_since_update': 1,
N
nicolargo 已提交
151 152
     'total': 31.4,
     'user': 21.4}
N
nicolargo 已提交
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169

Fields descriptions:

* **total**: Sum of all CPU percentages (except idle) (unit is *percent*)
* **system**: percent time spent in kernel space. System CPU time is the time spent running code in the Operating System kernel (unit is *percent*)
* **user**: CPU percent time spent in user space. User CPU time is the time spent on the processor running your program's code (or code in libraries) (unit is *percent*)
* **iowait**: *(Linux)*: percent time spent by the CPU waiting for I/O operations to complete (unit is *percent*)
* **idle**: percent of CPU used by any program. Every program or task that runs on a computer system occupies a certain amount of processing time on the CPU. If the CPU has completed all tasks it is idle (unit is *percent*)
* **irq**: *(Linux and BSD)*: percent time spent servicing/handling hardware/software interrupts. Time servicing interrupts (hardware + software) (unit is *percent*)
* **nice**: *(Unix)*: percent time occupied by user level processes with a positive nice value. The time the CPU has spent running users' processes that have been *niced* (unit is *percent*)
* **steal**: *(Linux)*: percentage of time a virtual CPU waits for a real CPU while the hypervisor is servicing another virtual processor (unit is *percent*)
* **ctx_switches**: number of context switches (voluntary + involuntary) per second. A context switch is a procedure that a computer's CPU (central processing unit) follows to change from one task (or process) to another while ensuring that the tasks do not conflict (unit is *percent*)
* **interrupts**: number of interrupts per second (unit is *percent*)
* **soft_interrupts**: number of software interrupts per second. Always set to 0 on Windows and SunOS (unit is *percent*)
* **cpucore**: Total number of CPU core (unit is *number*)
* **time_since_update**: Number of seconds since last update (unit is *seconds*)

N
nicolargo 已提交
170
Get a specific field::
N
nicolargo 已提交
171
    # curl http://localhost:61208/api/3/cpu/total
N
nicolargo 已提交
172
    {'total': 31.4}
N
nicolargo 已提交
173 174 175 176

GET diskio
----------

N
nicolargo 已提交
177
Get the plugins list::
N
nicolargo 已提交
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194

    # curl http://localhost:61208/api/3/diskio
    [{'disk_name': 'sda',
      'key': 'disk_name',
      'read_bytes': 0,
      'read_count': 0,
      'time_since_update': 1,
      'write_bytes': 0,
      'write_count': 0},
     {'disk_name': 'sda1',
      'key': 'disk_name',
      'read_bytes': 0,
      'read_count': 0,
      'time_since_update': 1,
      'write_bytes': 0,
      'write_count': 0}]

N
nicolargo 已提交
195
Get a specific field::
N
nicolargo 已提交
196 197 198
    # curl http://localhost:61208/api/3/diskio/disk_name
    {'disk_name': ['sda', 'sda1', 'sda2', 'sda5', 'dm-0', 'dm-1', 'sdc', 'sdc1']}

N
nicolargo 已提交
199
Get a specific item when field matchs the given value::
N
nicolargo 已提交
200 201 202 203 204 205 206 207 208 209 210 211
    # curl http://localhost:61208/api/3/diskio/disk_name/sda
    {'sda': [{'disk_name': 'sda',
              'key': 'disk_name',
              'read_bytes': 0,
              'read_count': 0,
              'time_since_update': 1,
              'write_bytes': 0,
              'write_count': 0}]}

GET fs
------

N
nicolargo 已提交
212
Get the plugins list::
N
nicolargo 已提交
213 214 215

    # curl http://localhost:61208/api/3/fs
    [{'device_name': '/dev/mapper/ubuntu--gnome--vg-root',
N
nicolargo 已提交
216
      'free': 36253220864,
N
nicolargo 已提交
217 218 219 220 221
      'fs_type': 'ext4',
      'key': 'mnt_point',
      'mnt_point': '/',
      'percent': 84.3,
      'size': 243396149248,
N
nicolargo 已提交
222
      'used': 194755473408},
N
nicolargo 已提交
223 224 225 226 227 228 229 230 231
     {'device_name': '/dev/sdc1',
      'free': 3814915088384,
      'fs_type': 'fuseblk',
      'key': 'mnt_point',
      'mnt_point': '/media/nicolargo/Elements',
      'percent': 4.6,
      'size': 4000750497792,
      'used': 185835409408}]

N
nicolargo 已提交
232
Get a specific field::
N
nicolargo 已提交
233 234 235
    # curl http://localhost:61208/api/3/fs/mnt_point
    {'mnt_point': ['/', '/media/nicolargo/Elements']}

N
nicolargo 已提交
236
Get a specific item when field matchs the given value::
N
nicolargo 已提交
237 238
    # curl http://localhost:61208/api/3/fs/mnt_point//
    {'/': [{'device_name': '/dev/mapper/ubuntu--gnome--vg-root',
N
nicolargo 已提交
239
            'free': 36253220864,
N
nicolargo 已提交
240 241 242 243 244
            'fs_type': 'ext4',
            'key': 'mnt_point',
            'mnt_point': '/',
            'percent': 84.3,
            'size': 243396149248,
N
nicolargo 已提交
245
            'used': 194755473408}]}
N
nicolargo 已提交
246 247 248 249

GET ip
------

N
nicolargo 已提交
250
Get the plugins list::
N
nicolargo 已提交
251 252 253 254 255 256 257

    # curl http://localhost:61208/api/3/ip
    {'address': '192.168.43.139',
     'gateway': '192.168.43.136',
     'mask': '255.255.255.0',
     'mask_cidr': 24}

N
nicolargo 已提交
258
Get a specific field::
N
nicolargo 已提交
259 260 261 262 263 264
    # curl http://localhost:61208/api/3/ip/address
    {'address': '192.168.43.139'}

GET load
--------

N
nicolargo 已提交
265
Get the plugins list::
N
nicolargo 已提交
266 267

    # curl http://localhost:61208/api/3/load
N
nicolargo 已提交
268
    {'cpucore': 4, 'min1': 1.29, 'min15': 1.01, 'min5': 1.08}
N
nicolargo 已提交
269 270 271 272 273 274 275 276

Fields descriptions:

* **min1**: Average sum of the number of processes waiting in the run-queue plus the number currently executing over 1 minute (unit is *number*)
* **min5**: Average sum of the number of processes waiting in the run-queue plus the number currently executing over 5 minutes (unit is *number*)
* **min15**: Average sum of the number of processes waiting in the run-queue plus the number currently executing over 15 minutes (unit is *number*)
* **cpucore**: Total number of CPU core (unit is *number*)

N
nicolargo 已提交
277
Get a specific field::
N
nicolargo 已提交
278
    # curl http://localhost:61208/api/3/load/min1
N
nicolargo 已提交
279
    {'min1': 1.29}
N
nicolargo 已提交
280 281 282 283

GET mem
-------

N
nicolargo 已提交
284
Get the plugins list::
N
nicolargo 已提交
285 286

    # curl http://localhost:61208/api/3/mem
N
nicolargo 已提交
287 288 289 290 291 292 293 294
    {'active': 4897742848,
     'available': 1909514240,
     'buffers': 694054912,
     'cached': 1825673216,
     'free': 1909514240,
     'inactive': 1632006144,
     'percent': 75.7,
     'shared': 692854784,
N
nicolargo 已提交
295
     'total': 7849062400,
N
nicolargo 已提交
296
     'used': 5939548160}
N
nicolargo 已提交
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311

Fields descriptions:

* **total**: Total physical memory available (unit is *bytes*)
* **available**: The actual amount of available memory that can be given instantly to processes that request more memory in bytes; this is calculated by summing different memory values depending on the platform (e.g. free + buffers + cached on Linux) and it is supposed to be used to monitor actual memory usage in a cross platform fashion (unit is *bytes*)
* **percent**: The percentage usage calculated as (total - available) / total * 100 (unit is *percent*)
* **used**: Memory used, calculated differently depending on the platform and designed for informational purposes only (unit is *bytes*)
* **free**: Memory not being used at all (zeroed) that is readily available; note that this doesn't reflect the actual memory available (use 'available' instead) (unit is *bytes*)
* **active**: *(UNIX)*: memory currently in use or very recently used, and so it is in RAM (unit is *bytes*)
* **inactive**: *(UNIX)*: memory that is marked as not used (unit is *bytes*)
* **buffers**: *(Linux, BSD)*: cache for things like file system metadata (unit is *bytes*)
* **cached**: *(Linux, BSD)*: cache for various things (unit is *bytes*)
* **wired**: *(BSD, macOS)*: memory that is marked to always stay in RAM. It is never moved to disk (unit is *bytes*)
* **shared**: *(BSD)*: memory that may be simultaneously accessed by multiple processes (unit is *bytes*)

N
nicolargo 已提交
312
Get a specific field::
N
nicolargo 已提交
313 314 315 316 317 318
    # curl http://localhost:61208/api/3/mem/total
    {'total': 7849062400}

GET memswap
-----------

N
nicolargo 已提交
319
Get the plugins list::
N
nicolargo 已提交
320 321 322 323

    # curl http://localhost:61208/api/3/memswap
    {'free': 6102118400,
     'percent': 24.5,
N
nicolargo 已提交
324
     'sin': 8697958400,
N
nicolargo 已提交
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339
     'sout': 13157560320,
     'time_since_update': 1,
     'total': 8082419712,
     'used': 1980301312}

Fields descriptions:

* **total**: Total swap memory (unit is *bytes*)
* **used**: Used swap memory (unit is *bytes*)
* **free**: Free swap memory (unit is *bytes*)
* **percent**: Used swap memory in percentage (unit is *percent*)
* **sin**: The number of bytes the system has swapped in from disk (cumulative) (unit is *bytes*)
* **sout**: The number of bytes the system has swapped out from disk (cumulative) (unit is *bytes*)
* **time_since_update**: Number of seconds since last update (unit is *seconds*)

N
nicolargo 已提交
340
Get a specific field::
N
nicolargo 已提交
341 342 343 344 345 346
    # curl http://localhost:61208/api/3/memswap/total
    {'total': 8082419712}

GET network
-----------

N
nicolargo 已提交
347
Get the plugins list::
N
nicolargo 已提交
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362

    # curl http://localhost:61208/api/3/network
    [{'alias': None,
      'cumulative_cx': 0,
      'cumulative_rx': 0,
      'cumulative_tx': 0,
      'cx': 0,
      'interface_name': 'mpqemubr0-dummy',
      'is_up': False,
      'key': 'interface_name',
      'rx': 0,
      'speed': 0,
      'time_since_update': 1,
      'tx': 0},
     {'alias': None,
N
nicolargo 已提交
363 364 365
      'cumulative_cx': 3716936768,
      'cumulative_rx': 1858468384,
      'cumulative_tx': 1858468384,
N
nicolargo 已提交
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386
      'cx': 200,
      'interface_name': 'lo',
      'is_up': True,
      'key': 'interface_name',
      'rx': 100,
      'speed': 0,
      'time_since_update': 1,
      'tx': 100}]

Fields descriptions:

* **interface_name**: Interface name (unit is *string*)
* **alias**: Interface alias name (optional) (unit is *string*)
* **rx**: The received/input rate (in bit per second) (unit is *bps*)
* **tx**: The sent/output rate (in bit per second) (unit is *bps*)
* **cumulative_rx**: The number of bytes received through the interface (cumulative) (unit is *bytes*)
* **cumulative_tx**: The number of bytes sent through the interface (cumulative) (unit is *bytes*)
* **speed**: Maximum interface speed (in bit per second). Can return 0 on some operating-system (unit is *bps*)
* **is_up**: Is the interface up ? (unit is *bool*)
* **time_since_update**: Number of seconds since last update (unit is *seconds*)

N
nicolargo 已提交
387
Get a specific field::
N
nicolargo 已提交
388 389 390 391 392 393 394 395 396 397 398
    # curl http://localhost:61208/api/3/network/interface_name
    {'interface_name': ['mpqemubr0-dummy',
                        'lo',
                        'mpqemubr0',
                        'tap-838a195875f',
                        'docker0',
                        'wlp2s0',
                        'br-119e6ee04e05',
                        'vboxnet0',
                        'br-87386b77b676']}

N
nicolargo 已提交
399
Get a specific item when field matchs the given value::
N
nicolargo 已提交
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416
    # curl http://localhost:61208/api/3/network/interface_name/mpqemubr0-dummy
    {'mpqemubr0-dummy': [{'alias': None,
                          'cumulative_cx': 0,
                          'cumulative_rx': 0,
                          'cumulative_tx': 0,
                          'cx': 0,
                          'interface_name': 'mpqemubr0-dummy',
                          'is_up': False,
                          'key': 'interface_name',
                          'rx': 0,
                          'speed': 0,
                          'time_since_update': 1,
                          'tx': 0}]}

GET now
-------

N
nicolargo 已提交
417
Get the plugins list::
N
nicolargo 已提交
418 419

    # curl http://localhost:61208/api/3/now
N
nicolargo 已提交
420
    '2021-07-17 09:43:50 CEST'
N
nicolargo 已提交
421 422 423 424

GET percpu
----------

N
nicolargo 已提交
425
Get the plugins list::
N
nicolargo 已提交
426 427 428 429 430

    # curl http://localhost:61208/api/3/percpu
    [{'cpu_number': 0,
      'guest': 0.0,
      'guest_nice': 0.0,
N
nicolargo 已提交
431
      'idle': 7.0,
N
nicolargo 已提交
432 433 434 435
      'iowait': 0.0,
      'irq': 0.0,
      'key': 'cpu_number',
      'nice': 0.0,
N
nicolargo 已提交
436
      'softirq': 0.0,
N
nicolargo 已提交
437
      'steal': 0.0,
N
nicolargo 已提交
438 439 440
      'system': 2.0,
      'total': 93.0,
      'user': 16.0},
N
nicolargo 已提交
441 442 443
     {'cpu_number': 1,
      'guest': 0.0,
      'guest_nice': 0.0,
N
nicolargo 已提交
444
      'idle': 20.0,
N
nicolargo 已提交
445 446 447 448 449 450
      'iowait': 0.0,
      'irq': 0.0,
      'key': 'cpu_number',
      'nice': 0.0,
      'softirq': 1.0,
      'steal': 0.0,
N
nicolargo 已提交
451 452 453
      'system': 0.0,
      'total': 80.0,
      'user': 3.0}]
N
nicolargo 已提交
454

N
nicolargo 已提交
455
Get a specific field::
N
nicolargo 已提交
456 457 458 459 460 461
    # curl http://localhost:61208/api/3/percpu/cpu_number
    {'cpu_number': [0, 1, 2, 3]}

GET ports
---------

N
nicolargo 已提交
462
Get the plugins list::
N
nicolargo 已提交
463 464 465 466 467 468 469 470

    # curl http://localhost:61208/api/3/ports
    [{'description': 'DefaultGateway',
      'host': '192.168.43.136',
      'indice': 'port_0',
      'port': 0,
      'refresh': 30,
      'rtt_warning': None,
N
nicolargo 已提交
471
      'status': 0.00617,
N
nicolargo 已提交
472 473
      'timeout': 3}]

N
nicolargo 已提交
474
Get a specific field::
N
nicolargo 已提交
475 476 477
    # curl http://localhost:61208/api/3/ports/host
    {'host': ['192.168.43.136']}

N
nicolargo 已提交
478
Get a specific item when field matchs the given value::
N
nicolargo 已提交
479 480 481 482 483 484 485
    # curl http://localhost:61208/api/3/ports/host/192.168.43.136
    {'192.168.43.136': [{'description': 'DefaultGateway',
                         'host': '192.168.43.136',
                         'indice': 'port_0',
                         'port': 0,
                         'refresh': 30,
                         'rtt_warning': None,
N
nicolargo 已提交
486
                         'status': 0.00617,
N
nicolargo 已提交
487 488 489 490 491
                         'timeout': 3}]}

GET processcount
----------------

N
nicolargo 已提交
492
Get the plugins list::
N
nicolargo 已提交
493 494

    # curl http://localhost:61208/api/3/processcount
N
nicolargo 已提交
495
    {'pid_max': 0, 'running': 1, 'sleeping': 287, 'thread': 1495, 'total': 348}
N
nicolargo 已提交
496

N
nicolargo 已提交
497
Get a specific field::
N
nicolargo 已提交
498
    # curl http://localhost:61208/api/3/processcount/total
N
nicolargo 已提交
499
    {'total': 348}
N
nicolargo 已提交
500 501 502 503

GET processlist
---------------

N
nicolargo 已提交
504
Get the plugins list::
N
nicolargo 已提交
505 506 507 508 509

    # curl http://localhost:61208/api/3/processlist
    [{'cmdline': ['/home/nicolargo/dev/glances/venv/bin/python3.8',
                  '/home/nicolargo/.vscode/extensions/ms-python.python-2021.5.926500501/pythonFiles/run-jedi-language-server.py'],
      'cpu_percent': 0.0,
N
nicolargo 已提交
510
      'cpu_times': pcputimes(user=5838.15, system=345.85, children_user=0.0, children_system=0.0, iowait=15.24),
N
nicolargo 已提交
511 512 513
      'gids': pgids(real=1000, effective=1000, saved=1000),
      'io_counters': [678944768, 109338624, 0, 0, 0],
      'key': 'pid',
N
nicolargo 已提交
514 515
      'memory_info': pmem(rss=665624576, vms=909639680, shared=3633152, text=2846720, lib=0, data=689029120, dirty=0),
      'memory_percent': 8.480306845311867,
N
nicolargo 已提交
516 517 518 519 520 521 522 523
      'name': 'python3.8',
      'nice': 0,
      'num_threads': 4,
      'pid': 2702806,
      'ppid': 2702621,
      'status': 'S',
      'time_since_update': 1,
      'username': 'nicolargo'},
N
nicolargo 已提交
524
     {'cmdline': ['/usr/lib/firefox/firefox', '-new-window'],
N
nicolargo 已提交
525
      'cpu_percent': 0.0,
N
nicolargo 已提交
526
      'cpu_times': pcputimes(user=2104.27, system=824.75, children_user=3425.17, children_system=514.13, iowait=2.37),
N
nicolargo 已提交
527
      'gids': pgids(real=1000, effective=1000, saved=1000),
N
nicolargo 已提交
528
      'io_counters': [1527762944, 2602557440, 0, 0, 0],
N
nicolargo 已提交
529
      'key': 'pid',
N
nicolargo 已提交
530 531 532
      'memory_info': pmem(rss=452657152, vms=4601450496, shared=113090560, text=622592, lib=0, data=1007812608, dirty=0),
      'memory_percent': 5.767021956660709,
      'name': 'firefox',
N
nicolargo 已提交
533
      'nice': 0,
N
nicolargo 已提交
534 535 536
      'num_threads': 114,
      'pid': 2993020,
      'ppid': 8496,
N
nicolargo 已提交
537 538 539 540
      'status': 'S',
      'time_since_update': 1,
      'username': 'nicolargo'}]

N
nicolargo 已提交
541
Get a specific field::
N
nicolargo 已提交
542 543
    # curl http://localhost:61208/api/3/processlist/pid
    {'pid': [2702806,
N
nicolargo 已提交
544
             2993020,
N
nicolargo 已提交
545 546 547 548 549 550 551 552
             2702582,
             2993144,
             2993283,
             9122,
             3079121,
             42230,
             2993375,
             2702621,
N
nicolargo 已提交
553
             2993148,
N
nicolargo 已提交
554
             3078543,
N
nicolargo 已提交
555 556
             3125399,
             3125732,
N
nicolargo 已提交
557
             3075417,
N
nicolargo 已提交
558
             3125352,
N
nicolargo 已提交
559 560 561 562 563
             3090242,
             2938292,
             2702525,
             744165,
             3056321,
N
nicolargo 已提交
564
             2702553,
N
nicolargo 已提交
565
             2993158,
N
nicolargo 已提交
566
             2702636,
N
nicolargo 已提交
567 568 569 570 571 572 573
             8654,
             2702653,
             2791638,
             2702815,
             3244,
             3103852,
             8639,
N
nicolargo 已提交
574
             3126511,
N
nicolargo 已提交
575 576 577 578 579 580 581 582
             2741015,
             2791637,
             2702565,
             2791665,
             8540,
             3419,
             3120308,
             2817004,
N
nicolargo 已提交
583
             2702789,
N
nicolargo 已提交
584
             2625397,
N
nicolargo 已提交
585
             3076986,
N
nicolargo 已提交
586 587 588 589 590 591
             2598927,
             2994159,
             4497,
             9696,
             28036,
             8538,
N
nicolargo 已提交
592
             3120307,
N
nicolargo 已提交
593 594 595 596 597 598 599
             9412,
             1,
             3120328,
             1101,
             9880,
             2739211,
             9520,
N
nicolargo 已提交
600
             2702662,
N
nicolargo 已提交
601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693
             9915,
             2791760,
             10076,
             3120327,
             9918,
             1140,
             9539,
             218114,
             2625601,
             1264,
             9975,
             9421,
             42244,
             9791,
             7479,
             8496,
             8553,
             9911,
             1675998,
             3074778,
             9427,
             3074791,
             9962,
             3074785,
             3201,
             8594,
             9608,
             2625324,
             2702529,
             2625388,
             2702528,
             9936,
             1099,
             8546,
             1636,
             9073,
             2625339,
             3103956,
             9910,
             9820,
             2078532,
             9432,
             10009,
             223473,
             1141,
             1137,
             9957,
             9934,
             2625334,
             3075380,
             9596,
             10001,
             2035399,
             9903,
             44159,
             1085,
             9929,
             10045,
             2622728,
             9453,
             8623,
             9925,
             10017,
             2625605,
             223504,
             9953,
             1093,
             9877,
             1115,
             2625489,
             43602,
             2614935,
             8822,
             8672,
             3056033,
             9762,
             8650,
             9941,
             169607,
             9420,
             2548721,
             2525291,
             1905447,
             627089,
             9010,
             713820,
             1122,
             9016,
             9969,
             8995,
             298444,
             1110,
             8664,
N
nicolargo 已提交
694
             3126498,
N
nicolargo 已提交
695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720
             43938,
             8575,
             8614,
             1134,
             1096,
             3103851,
             1316,
             8633,
             2625337,
             1168,
             2879345,
             1001,
             8586,
             2879435,
             2625021,
             1097,
             4504,
             1125,
             9066,
             2625338,
             3217,
             1462,
             8953,
             2620923,
             9512,
             1086,
N
nicolargo 已提交
721
             3126510,
N
nicolargo 已提交
722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883
             3953,
             3229,
             3103980,
             3077281,
             3225,
             1310,
             978,
             1171,
             370,
             13314,
             8498,
             2,
             3,
             4,
             9,
             10,
             11,
             12,
             13,
             14,
             15,
             16,
             17,
             18,
             21,
             22,
             23,
             24,
             27,
             28,
             29,
             30,
             33,
             34,
             35,
             36,
             37,
             38,
             39,
             40,
             41,
             42,
             91,
             92,
             93,
             94,
             95,
             96,
             97,
             98,
             99,
             102,
             103,
             105,
             107,
             108,
             112,
             121,
             139,
             181,
             191,
             192,
             193,
             194,
             195,
             196,
             197,
             198,
             200,
             201,
             206,
             207,
             238,
             288,
             289,
             309,
             360,
             364,
             390,
             439,
             450,
             451,
             452,
             453,
             513,
             514,
             531,
             842,
             843,
             844,
             845,
             846,
             847,
             848,
             849,
             850,
             851,
             852,
             853,
             1323,
             1527,
             1529,
             1531,
             1533,
             1534,
             1537,
             1538,
             1540,
             8648,
             11754,
             14346,
             45609,
             45610,
             45621,
             45622,
             45623,
             45624,
             45625,
             45626,
             217392,
             574771,
             1893153,
             2058173,
             2318240,
             2624916,
             2624918,
             2702007,
             2717801,
             2777389,
             2779024,
             2780261,
             2816759,
             2816957,
             2817447,
             2817525,
             2817644,
             2848355,
             2848483,
             2848744,
             2891750,
             2892014,
             2926441,
             2927027,
             2927659,
             2938027,
             2939167,
             2981539,
             3043867,
             3055870,
             3055871,
             3055872,
             3076088,
             3076171,
             3076588,
             3106441,
             3115093,
             3120203,
             3120205,
             3122327,
             3122446,
             3123701,
             3124311,
N
nicolargo 已提交
884 885 886 887 888 889 890 891 892
             3124426,
             3125017,
             3125269,
             3125272,
             3125705,
             3125716,
             3126114]}

Get a specific item when field matchs the given value::
N
nicolargo 已提交
893 894 895 896
    # curl http://localhost:61208/api/3/processlist/pid/2702806
    {'2702806': [{'cmdline': ['/home/nicolargo/dev/glances/venv/bin/python3.8',
                              '/home/nicolargo/.vscode/extensions/ms-python.python-2021.5.926500501/pythonFiles/run-jedi-language-server.py'],
                  'cpu_percent': 0.0,
N
nicolargo 已提交
897
                  'cpu_times': [5838.15, 345.85, 0.0, 0.0, 15.24],
N
nicolargo 已提交
898 899 900
                  'gids': [1000, 1000, 1000],
                  'io_counters': [678944768, 109338624, 0, 0, 0],
                  'key': 'pid',
N
nicolargo 已提交
901 902
                  'memory_info': [665624576,
                                  909639680,
N
nicolargo 已提交
903 904 905
                                  3633152,
                                  2846720,
                                  0,
N
nicolargo 已提交
906
                                  689029120,
N
nicolargo 已提交
907
                                  0],
N
nicolargo 已提交
908
                  'memory_percent': 8.480306845311867,
N
nicolargo 已提交
909 910 911 912 913 914 915 916 917 918 919 920
                  'name': 'python3.8',
                  'nice': 0,
                  'num_threads': 4,
                  'pid': 2702806,
                  'ppid': 2702621,
                  'status': 'S',
                  'time_since_update': 1,
                  'username': 'nicolargo'}]}

GET psutilversion
-----------------

N
nicolargo 已提交
921
Get the plugins list::
N
nicolargo 已提交
922 923 924 925 926 927 928

    # curl http://localhost:61208/api/3/psutilversion
    (5, 8, 0)

GET quicklook
-------------

N
nicolargo 已提交
929
Get the plugins list::
N
nicolargo 已提交
930 931

    # curl http://localhost:61208/api/3/quicklook
N
nicolargo 已提交
932
    {'cpu': 31.4,
N
nicolargo 已提交
933
     'cpu_hz': 3000000000.0,
N
nicolargo 已提交
934
     'cpu_hz_current': 2484555500.0,
N
nicolargo 已提交
935
     'cpu_name': 'Intel(R) Core(TM) i7-4500U CPU @ 1.80GH',
N
nicolargo 已提交
936
     'mem': 75.7,
N
nicolargo 已提交
937 938 939
     'percpu': [{'cpu_number': 0,
                 'guest': 0.0,
                 'guest_nice': 0.0,
N
nicolargo 已提交
940
                 'idle': 7.0,
N
nicolargo 已提交
941 942 943 944
                 'iowait': 0.0,
                 'irq': 0.0,
                 'key': 'cpu_number',
                 'nice': 0.0,
N
nicolargo 已提交
945
                 'softirq': 0.0,
N
nicolargo 已提交
946
                 'steal': 0.0,
N
nicolargo 已提交
947 948 949
                 'system': 2.0,
                 'total': 93.0,
                 'user': 16.0},
N
nicolargo 已提交
950 951 952
                {'cpu_number': 1,
                 'guest': 0.0,
                 'guest_nice': 0.0,
N
nicolargo 已提交
953
                 'idle': 20.0,
N
nicolargo 已提交
954 955 956 957 958 959
                 'iowait': 0.0,
                 'irq': 0.0,
                 'key': 'cpu_number',
                 'nice': 0.0,
                 'softirq': 1.0,
                 'steal': 0.0,
N
nicolargo 已提交
960 961 962
                 'system': 0.0,
                 'total': 80.0,
                 'user': 3.0},
N
nicolargo 已提交
963 964 965
                {'cpu_number': 2,
                 'guest': 0.0,
                 'guest_nice': 0.0,
N
nicolargo 已提交
966
                 'idle': 23.0,
N
nicolargo 已提交
967 968 969 970
                 'iowait': 0.0,
                 'irq': 0.0,
                 'key': 'cpu_number',
                 'nice': 0.0,
N
nicolargo 已提交
971
                 'softirq': 1.0,
N
nicolargo 已提交
972 973
                 'steal': 0.0,
                 'system': 1.0,
N
nicolargo 已提交
974
                 'total': 77.0,
N
nicolargo 已提交
975 976 977 978
                 'user': 1.0},
                {'cpu_number': 3,
                 'guest': 0.0,
                 'guest_nice': 0.0,
N
nicolargo 已提交
979
                 'idle': 19.0,
N
nicolargo 已提交
980 981 982 983
                 'iowait': 0.0,
                 'irq': 0.0,
                 'key': 'cpu_number',
                 'nice': 0.0,
N
nicolargo 已提交
984
                 'softirq': 4.0,
N
nicolargo 已提交
985
                 'steal': 0.0,
N
nicolargo 已提交
986 987 988
                 'system': 1.0,
                 'total': 81.0,
                 'user': 5.0}],
N
nicolargo 已提交
989 990
     'swap': 24.5}

N
nicolargo 已提交
991
Get a specific field::
N
nicolargo 已提交
992
    # curl http://localhost:61208/api/3/quicklook/cpu
N
nicolargo 已提交
993
    {'cpu': 31.4}
N
nicolargo 已提交
994 995 996 997

GET sensors
-----------

N
nicolargo 已提交
998
Get the plugins list::
N
nicolargo 已提交
999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015

    # curl http://localhost:61208/api/3/sensors
    [{'critical': 105,
      'key': 'label',
      'label': 'acpitz 1',
      'type': 'temperature_core',
      'unit': 'C',
      'value': 27,
      'warning': 105},
     {'critical': 105,
      'key': 'label',
      'label': 'acpitz 2',
      'type': 'temperature_core',
      'unit': 'C',
      'value': 29,
      'warning': 105}]

N
nicolargo 已提交
1016
Get a specific field::
N
nicolargo 已提交
1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027
    # curl http://localhost:61208/api/3/sensors/label
    {'label': ['acpitz 1',
               'acpitz 2',
               'CPU',
               'Ambient',
               'SODIMM',
               'Package id 0',
               'Core 0',
               'Core 1',
               'Battery']}

N
nicolargo 已提交
1028
Get a specific item when field matchs the given value::
N
nicolargo 已提交
1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040
    # curl http://localhost:61208/api/3/sensors/label/acpitz 1
    {'acpitz 1': [{'critical': 105,
                   'key': 'label',
                   'label': 'acpitz 1',
                   'type': 'temperature_core',
                   'unit': 'C',
                   'value': 27,
                   'warning': 105}]}

GET system
----------

N
nicolargo 已提交
1041
Get the plugins list::
N
nicolargo 已提交
1042 1043 1044 1045 1046 1047 1048 1049 1050

    # curl http://localhost:61208/api/3/system
    {'hostname': 'XPS13-9333',
     'hr_name': 'Ubuntu 20.04 64bit',
     'linux_distro': 'Ubuntu 20.04',
     'os_name': 'Linux',
     'os_version': '5.4.0-66-generic',
     'platform': '64bit'}

N
nicolargo 已提交
1051
Get a specific field::
N
nicolargo 已提交
1052 1053 1054 1055 1056 1057
    # curl http://localhost:61208/api/3/system/os_name
    {'os_name': 'Linux'}

GET uptime
----------

N
nicolargo 已提交
1058
Get the plugins list::
N
nicolargo 已提交
1059 1060

    # curl http://localhost:61208/api/3/uptime
N
nicolargo 已提交
1061
    {'seconds': 7860717}
N
nicolargo 已提交
1062 1063 1064 1065

GET all stats
-------------

N
nicolargo 已提交
1066
Get all Glances stats::
N
nicolargo 已提交
1067 1068 1069 1070 1071 1072
    # curl http://localhost:61208/api/3/all
    Return a very big dictionnary (avoid using this request, performances will be poor)...

GET stats history
-----------------

N
nicolargo 已提交
1073
History of a plugin::
N
nicolargo 已提交
1074
    # curl http://localhost:61208/api/3/cpu/history
N
nicolargo 已提交
1075 1076 1077 1078 1079 1080 1081 1082
    {'system': [['2021-07-17T09:43:50.760441', 5.0],
                ['2021-07-17T09:43:51.798650', 5.0],
                ['2021-07-17T09:43:52.893517', 1.3]],
     'user': [['2021-07-17T09:43:50.760434', 21.4],
              ['2021-07-17T09:43:51.798646', 21.4],
              ['2021-07-17T09:43:52.893513', 3.0]]}

Limit history to last 2 values::
N
nicolargo 已提交
1083
    # curl http://localhost:61208/api/3/cpu/history/2
N
nicolargo 已提交
1084 1085 1086 1087
    {'system': [['2021-07-17T09:43:51.798650', 5.0],
                ['2021-07-17T09:43:52.893517', 1.3]],
     'user': [['2021-07-17T09:43:51.798646', 21.4],
              ['2021-07-17T09:43:52.893513', 3.0]]}
N
nicolargo 已提交
1088

N
nicolargo 已提交
1089
History for a specific field::
N
nicolargo 已提交
1090
    # curl http://localhost:61208/api/3/cpu/system/history
N
nicolargo 已提交
1091 1092 1093
    {'system': [['2021-07-17T09:43:50.760441', 5.0],
                ['2021-07-17T09:43:51.798650', 5.0],
                ['2021-07-17T09:43:52.893517', 1.3]]}
N
nicolargo 已提交
1094

N
nicolargo 已提交
1095
Limit history for a specific field to last 2 values::
N
nicolargo 已提交
1096
    # curl http://localhost:61208/api/3/cpu/system/history
N
nicolargo 已提交
1097 1098
    {'system': [['2021-07-17T09:43:51.798650', 5.0],
                ['2021-07-17T09:43:52.893517', 1.3]]}
N
nicolargo 已提交
1099 1100 1101 1102

GET limits (used for thresholds)
--------------------------------

N
nicolargo 已提交
1103
All limits/thresholds::
N
nicolargo 已提交
1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287
    # curl http://localhost:61208/api/3/all/limits
    {'alert': {'history_size': 3600.0},
     'amps': {'amps_disable': ['False'], 'history_size': 3600.0},
     'cloud': {'history_size': 3600.0},
     'connections': {'connections_disable': ['True'],
                     'connections_nf_conntrack_percent_careful': 70.0,
                     'connections_nf_conntrack_percent_critical': 90.0,
                     'connections_nf_conntrack_percent_warning': 80.0,
                     'history_size': 3600.0},
     'core': {'history_size': 3600.0},
     'cpu': {'cpu_ctx_switches_careful': 160000.0,
             'cpu_ctx_switches_critical': 200000.0,
             'cpu_ctx_switches_warning': 180000.0,
             'cpu_disable': ['False'],
             'cpu_iowait_careful': 20.0,
             'cpu_iowait_critical': 25.0,
             'cpu_iowait_warning': 22.5,
             'cpu_steal_careful': 50.0,
             'cpu_steal_critical': 90.0,
             'cpu_steal_warning': 70.0,
             'cpu_system_careful': 50.0,
             'cpu_system_critical': 90.0,
             'cpu_system_log': ['False'],
             'cpu_system_warning': 70.0,
             'cpu_total_careful': 65.0,
             'cpu_total_critical': 85.0,
             'cpu_total_log': ['True'],
             'cpu_total_warning': 75.0,
             'cpu_user_careful': 50.0,
             'cpu_user_critical': 90.0,
             'cpu_user_log': ['False'],
             'cpu_user_warning': 70.0,
             'history_size': 3600.0},
     'diskio': {'diskio_disable': ['False'],
                'diskio_hide': ['loop.*', '/dev/loop*'],
                'history_size': 3600.0},
     'docker': {'docker_all': ['False'],
                'docker_disable': ['False'],
                'docker_max_name_size': 20.0,
                'history_size': 3600.0},
     'folders': {'folders_disable': ['False'], 'history_size': 3600.0},
     'fs': {'fs_careful': 50.0,
            'fs_critical': 90.0,
            'fs_disable': ['False'],
            'fs_hide': ['/boot.*', '/snap.*'],
            'fs_warning': 70.0,
            'history_size': 3600.0},
     'gpu': {'gpu_disable': ['False'],
             'gpu_mem_careful': 50.0,
             'gpu_mem_critical': 90.0,
             'gpu_mem_warning': 70.0,
             'gpu_proc_careful': 50.0,
             'gpu_proc_critical': 90.0,
             'gpu_proc_warning': 70.0,
             'history_size': 3600.0},
     'help': {'history_size': 3600.0},
     'ip': {'history_size': 3600.0},
     'irq': {'history_size': 3600.0, 'irq_disable': ['True']},
     'load': {'history_size': 3600.0,
              'load_careful': 0.7,
              'load_critical': 5.0,
              'load_disable': ['False'],
              'load_warning': 1.0},
     'mem': {'history_size': 3600.0,
             'mem_careful': 50.0,
             'mem_critical': 90.0,
             'mem_disable': ['False'],
             'mem_warning': 70.0},
     'memswap': {'history_size': 3600.0,
                 'memswap_careful': 50.0,
                 'memswap_critical': 90.0,
                 'memswap_disable': ['False'],
                 'memswap_warning': 70.0},
     'network': {'history_size': 3600.0,
                 'network_disable': ['False'],
                 'network_rx_careful': 70.0,
                 'network_rx_critical': 90.0,
                 'network_rx_warning': 80.0,
                 'network_tx_careful': 70.0,
                 'network_tx_critical': 90.0,
                 'network_tx_warning': 80.0},
     'now': {'history_size': 3600.0},
     'percpu': {'history_size': 3600.0,
                'percpu_disable': ['False'],
                'percpu_iowait_careful': 50.0,
                'percpu_iowait_critical': 90.0,
                'percpu_iowait_warning': 70.0,
                'percpu_system_careful': 50.0,
                'percpu_system_critical': 90.0,
                'percpu_system_warning': 70.0,
                'percpu_user_careful': 50.0,
                'percpu_user_critical': 90.0,
                'percpu_user_warning': 70.0},
     'ports': {'history_size': 3600.0,
               'ports_disable': ['False'],
               'ports_port_default_gateway': ['True'],
               'ports_refresh': 30.0,
               'ports_timeout': 3.0},
     'processcount': {'history_size': 3600.0, 'processcount_disable': ['False']},
     'processlist': {'history_size': 3600.0,
                     'processlist_cpu_careful': 50.0,
                     'processlist_cpu_critical': 90.0,
                     'processlist_cpu_warning': 70.0,
                     'processlist_disable': ['False'],
                     'processlist_mem_careful': 50.0,
                     'processlist_mem_critical': 90.0,
                     'processlist_mem_warning': 70.0,
                     'processlist_nice_warning': ['-20',
                                                  '-19',
                                                  '-18',
                                                  '-17',
                                                  '-16',
                                                  '-15',
                                                  '-14',
                                                  '-13',
                                                  '-12',
                                                  '-11',
                                                  '-10',
                                                  '-9',
                                                  '-8',
                                                  '-7',
                                                  '-6',
                                                  '-5',
                                                  '-4',
                                                  '-3',
                                                  '-2',
                                                  '-1',
                                                  '1',
                                                  '2',
                                                  '3',
                                                  '4',
                                                  '5',
                                                  '6',
                                                  '7',
                                                  '8',
                                                  '9',
                                                  '10',
                                                  '11',
                                                  '12',
                                                  '13',
                                                  '14',
                                                  '15',
                                                  '16',
                                                  '17',
                                                  '18',
                                                  '19']},
     'psutilversion': {'history_size': 3600.0},
     'quicklook': {'history_size': 3600.0,
                   'quicklook_cpu_careful': 50.0,
                   'quicklook_cpu_critical': 90.0,
                   'quicklook_cpu_warning': 70.0,
                   'quicklook_disable': ['False'],
                   'quicklook_mem_careful': 50.0,
                   'quicklook_mem_critical': 90.0,
                   'quicklook_mem_warning': 70.0,
                   'quicklook_percentage_char': ['|'],
                   'quicklook_swap_careful': 50.0,
                   'quicklook_swap_critical': 90.0,
                   'quicklook_swap_warning': 70.0},
     'raid': {'history_size': 3600.0, 'raid_disable': ['True']},
     'sensors': {'history_size': 3600.0,
                 'sensors_battery_careful': 80.0,
                 'sensors_battery_critical': 95.0,
                 'sensors_battery_warning': 90.0,
                 'sensors_disable': ['False'],
                 'sensors_refresh': 4.0,
                 'sensors_temperature_core_careful': 60.0,
                 'sensors_temperature_core_critical': 80.0,
                 'sensors_temperature_core_warning': 70.0,
                 'sensors_temperature_hdd_careful': 45.0,
                 'sensors_temperature_hdd_critical': 60.0,
                 'sensors_temperature_hdd_warning': 52.0},
     'smart': {'history_size': 3600.0, 'smart_disable': ['True']},
     'system': {'history_size': 3600.0,
                'system_disable': ['False'],
                'system_refresh': 60},
     'uptime': {'history_size': 3600.0},
     'wifi': {'history_size': 3600.0,
              'wifi_careful': -65.0,
              'wifi_critical': -85.0,
              'wifi_disable': ['True'],
              'wifi_hide': ['lo', 'docker.*'],
              'wifi_warning': -75.0}}

N
nicolargo 已提交
1288
Limits/thresholds for the cpu plugin::
N
nicolargo 已提交
1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312
    # curl http://localhost:61208/api/3/cpu/limits
    {'cpu_ctx_switches_careful': 160000.0,
     'cpu_ctx_switches_critical': 200000.0,
     'cpu_ctx_switches_warning': 180000.0,
     'cpu_disable': ['False'],
     'cpu_iowait_careful': 20.0,
     'cpu_iowait_critical': 25.0,
     'cpu_iowait_warning': 22.5,
     'cpu_steal_careful': 50.0,
     'cpu_steal_critical': 90.0,
     'cpu_steal_warning': 70.0,
     'cpu_system_careful': 50.0,
     'cpu_system_critical': 90.0,
     'cpu_system_log': ['False'],
     'cpu_system_warning': 70.0,
     'cpu_total_careful': 65.0,
     'cpu_total_critical': 85.0,
     'cpu_total_log': ['True'],
     'cpu_total_warning': 75.0,
     'cpu_user_careful': 50.0,
     'cpu_user_critical': 90.0,
     'cpu_user_log': ['False'],
     'cpu_user_warning': 70.0,
     'history_size': 3600.0}
A
Alessio Sergi 已提交
1313