Grafana dashboards not displayed with influxdb2 #1960

This commit is contained in:
nicolargo 2021-11-28 10:46:14 +01:00
parent d95a64c570
commit 1bbba2043c
4 changed files with 2796 additions and 289 deletions

File diff suppressed because it is too large Load Diff

View File

@ -55,14 +55,14 @@ GET alert
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/alert # curl http://localhost:61208/api/3/alert
[[1637578510.0, [[1638092725.0,
-1, -1,
'WARNING', 'WARNING',
'MEM', 'MEM',
78.74406723495967, 82.03056466616047,
78.74406723495967, 82.03056466616047,
78.74406723495967, 82.03056466616047,
78.74406723495967, 82.03056466616047,
1, 1,
[], [],
'', '',
@ -82,7 +82,7 @@ Get plugin stats::
'refresh': 3.0, 'refresh': 3.0,
'regex': True, 'regex': True,
'result': None, 'result': None,
'timer': 0.4732520580291748}, 'timer': 0.18709087371826172},
{'count': 0, {'count': 0,
'countmax': 20.0, 'countmax': 20.0,
'countmin': None, 'countmin': None,
@ -91,7 +91,7 @@ Get plugin stats::
'refresh': 3.0, 'refresh': 3.0,
'regex': True, 'regex': True,
'result': None, 'result': None,
'timer': 0.47315049171447754}] 'timer': 0.18697094917297363}]
Get a specific field:: Get a specific field::
@ -109,7 +109,7 @@ Get a specific item when field matchs the given value::
'refresh': 3.0, 'refresh': 3.0,
'regex': True, 'regex': True,
'result': None, 'result': None,
'timer': 0.4732520580291748}]} 'timer': 0.18709087371826172}]}
GET core GET core
-------- --------
@ -139,19 +139,19 @@ Get plugin stats::
'ctx_switches': 0, 'ctx_switches': 0,
'guest': 0.0, 'guest': 0.0,
'guest_nice': 0.0, 'guest_nice': 0.0,
'idle': 80.5, 'idle': 70.5,
'interrupts': 0, 'interrupts': 0,
'iowait': 0.0, 'iowait': 0.3,
'irq': 0.0, 'irq': 0.0,
'nice': 0.0, 'nice': 0.0,
'soft_interrupts': 0, 'soft_interrupts': 0,
'softirq': 1.7, 'softirq': 1.0,
'steal': 0.0, 'steal': 0.0,
'syscalls': 0, 'syscalls': 0,
'system': 2.0, 'system': 5.3,
'time_since_update': 1, 'time_since_update': 1,
'total': 21.3, 'total': 29.4,
'user': 15.8} 'user': 22.9}
Fields descriptions: Fields descriptions:
@ -173,7 +173,7 @@ Fields descriptions:
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/cpu/total # curl http://localhost:61208/api/3/cpu/total
{'total': 21.3} {'total': 29.4}
GET diskio GET diskio
---------- ----------
@ -212,6 +212,41 @@ Get a specific item when field matchs the given value::
'write_bytes': 0, 'write_bytes': 0,
'write_count': 0}]} 'write_count': 0}]}
GET docker
----------
Get plugin stats::
# curl http://localhost:61208/api/3/docker
[{'Command': ['/bin/sh',
'-c',
'python3 -m glances -C /glances/conf/glances.conf $GLANCES_OPT'],
'Id': 'b37a03b9cd71ff9d83bb39ca93e6554a48c82bf8f4c757251f7de4847085061f',
'Image': ['nicolargo/glances:dev'],
'Names': ['dockerinfluxdb2grafana_glances_1'],
'Status': 'paused',
'cpu_percent': 0.0,
'io_r': None,
'io_w': None,
'key': 'name',
'memory_usage': None,
'name': 'dockerinfluxdb2grafana_glances_1',
'network_rx': None,
'network_tx': None},
{'Command': ['/entrypoint.sh', 'influxd'],
'Id': 'cf5df66383ead8b7a332b25956506bfc33573ba449d9dab98fcc606454d604cb',
'Image': ['influxdb:latest'],
'Names': ['dockerinfluxdb2grafana_influxdb_1'],
'Status': 'running',
'cpu_percent': 0.0,
'io_r': None,
'io_w': None,
'key': 'name',
'memory_usage': None,
'name': 'dockerinfluxdb2grafana_influxdb_1',
'network_rx': None,
'network_tx': None}]
GET fs GET fs
------ ------
@ -219,13 +254,13 @@ Get plugin stats::
# curl http://localhost:61208/api/3/fs # curl http://localhost:61208/api/3/fs
[{'device_name': '/dev/mapper/ubuntu--gnome--vg-root', [{'device_name': '/dev/mapper/ubuntu--gnome--vg-root',
'free': 32468725760, 'free': 31174983680,
'fs_type': 'ext4', 'fs_type': 'ext4',
'key': 'mnt_point', 'key': 'mnt_point',
'mnt_point': '/', 'mnt_point': '/',
'percent': 85.9, 'percent': 86.5,
'size': 243396149248, 'size': 243396149248,
'used': 198539968512}] 'used': 199833710592}]
Get a specific field:: Get a specific field::
@ -236,13 +271,13 @@ Get a specific item when field matchs the given value::
# curl http://localhost:61208/api/3/fs/mnt_point// # curl http://localhost:61208/api/3/fs/mnt_point//
{'/': [{'device_name': '/dev/mapper/ubuntu--gnome--vg-root', {'/': [{'device_name': '/dev/mapper/ubuntu--gnome--vg-root',
'free': 32468725760, 'free': 31174983680,
'fs_type': 'ext4', 'fs_type': 'ext4',
'key': 'mnt_point', 'key': 'mnt_point',
'mnt_point': '/', 'mnt_point': '/',
'percent': 85.9, 'percent': 86.5,
'size': 243396149248, 'size': 243396149248,
'used': 198539968512}]} 'used': 199833710592}]}
GET ip GET ip
------ ------
@ -267,7 +302,7 @@ GET load
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/load # curl http://localhost:61208/api/3/load
{'cpucore': 4, 'min1': 0.16, 'min15': 0.74, 'min5': 0.57} {'cpucore': 4, 'min1': 1.33, 'min15': 1.33, 'min5': 1.62}
Fields descriptions: Fields descriptions:
@ -279,7 +314,7 @@ Fields descriptions:
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/load/min1 # curl http://localhost:61208/api/3/load/min1
{'min1': 0.16} {'min1': 1.33}
GET mem GET mem
------- -------
@ -287,16 +322,16 @@ GET mem
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/mem # curl http://localhost:61208/api/3/mem
{'active': 5267816448, {'active': 5155495936,
'available': 1668382720, 'available': 1410424832,
'buffers': 180994048, 'buffers': 93065216,
'cached': 1888440320, 'cached': 1465229312,
'free': 1668382720, 'free': 1410424832,
'inactive': 1315483648, 'inactive': 1209888768,
'percent': 78.7, 'percent': 82.0,
'shared': 661803008, 'shared': 584937472,
'total': 7849021440, 'total': 7849021440,
'used': 6180638720} 'used': 6438596608}
Fields descriptions: Fields descriptions:
@ -323,13 +358,13 @@ GET memswap
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/memswap # curl http://localhost:61208/api/3/memswap
{'free': 6126350336, {'free': 6121762816,
'percent': 24.2, 'percent': 24.3,
'sin': 1044303872, 'sin': 1548627968,
'sout': 3452276736, 'sout': 4385939456,
'time_since_update': 1, 'time_since_update': 1,
'total': 8082419712, 'total': 8082419712,
'used': 1956069376} 'used': 1960656896}
Fields descriptions: Fields descriptions:
@ -353,6 +388,18 @@ Get plugin stats::
# curl http://localhost:61208/api/3/network # curl http://localhost:61208/api/3/network
[{'alias': None, [{'alias': None,
'cumulative_cx': 59804055,
'cumulative_rx': 19375827,
'cumulative_tx': 40428228,
'cx': 0,
'interface_name': 'veth2845bac',
'is_up': True,
'key': 'interface_name',
'rx': 0,
'speed': 10485760000,
'time_since_update': 1,
'tx': 0},
{'alias': None,
'cumulative_cx': 3698139, 'cumulative_cx': 3698139,
'cumulative_rx': 40807, 'cumulative_rx': 40807,
'cumulative_tx': 3657332, 'cumulative_tx': 3657332,
@ -363,18 +410,6 @@ Get plugin stats::
'rx': 0, 'rx': 0,
'speed': 0, 'speed': 0,
'time_since_update': 1, 'time_since_update': 1,
'tx': 0},
{'alias': None,
'cumulative_cx': 0,
'cumulative_rx': 0,
'cumulative_tx': 0,
'cx': 0,
'interface_name': 'mpqemubr0',
'is_up': False,
'key': 'interface_name',
'rx': 0,
'speed': 0,
'time_since_update': 1,
'tx': 0}] 'tx': 0}]
Fields descriptions: Fields descriptions:
@ -392,28 +427,31 @@ Fields descriptions:
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/network/interface_name # curl http://localhost:61208/api/3/network/interface_name
{'interface_name': ['docker0', {'interface_name': ['veth2845bac',
'docker0',
'veth59b1a36',
'mpqemubr0', 'mpqemubr0',
'lo', 'lo',
'br_grafana',
'br-119e6ee04e05', 'br-119e6ee04e05',
'wlp2s0', 'wlp2s0',
'br-87386b77b676']} 'br-87386b77b676']}
Get a specific item when field matchs the given value:: Get a specific item when field matchs the given value::
# curl http://localhost:61208/api/3/network/interface_name/docker0 # curl http://localhost:61208/api/3/network/interface_name/veth2845bac
{'docker0': [{'alias': None, {'veth2845bac': [{'alias': None,
'cumulative_cx': 3698139, 'cumulative_cx': 59804055,
'cumulative_rx': 40807, 'cumulative_rx': 19375827,
'cumulative_tx': 3657332, 'cumulative_tx': 40428228,
'cx': 0, 'cx': 0,
'interface_name': 'docker0', 'interface_name': 'veth2845bac',
'is_up': False, 'is_up': True,
'key': 'interface_name', 'key': 'interface_name',
'rx': 0, 'rx': 0,
'speed': 0, 'speed': 10485760000,
'time_since_update': 1, 'time_since_update': 1,
'tx': 0}]} 'tx': 0}]}
GET now GET now
------- -------
@ -421,7 +459,7 @@ GET now
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/now # curl http://localhost:61208/api/3/now
'2021-11-22 11:55:10 CET' '2021-11-28 10:45:25 CET'
GET percpu GET percpu
---------- ----------
@ -432,29 +470,29 @@ Get plugin stats::
[{'cpu_number': 0, [{'cpu_number': 0,
'guest': 0.0, 'guest': 0.0,
'guest_nice': 0.0, 'guest_nice': 0.0,
'idle': 92.9, 'idle': 74.0,
'iowait': 0.0,
'irq': 0.0,
'key': 'cpu_number',
'nice': 0.0,
'softirq': 1.8,
'steal': 0.0,
'system': 1.8,
'total': 7.1,
'user': 3.6},
{'cpu_number': 1,
'guest': 0.0,
'guest_nice': 0.0,
'idle': 35.5,
'iowait': 0.0, 'iowait': 0.0,
'irq': 0.0, 'irq': 0.0,
'key': 'cpu_number', 'key': 'cpu_number',
'nice': 0.0, 'nice': 0.0,
'softirq': 0.0, 'softirq': 0.0,
'steal': 0.0, 'steal': 0.0,
'system': 1.8, 'system': 6.0,
'total': 64.5, 'total': 26.0,
'user': 62.7}] 'user': 5.0},
{'cpu_number': 1,
'guest': 0.0,
'guest_nice': 0.0,
'idle': 10.0,
'iowait': 0.0,
'irq': 0.0,
'key': 'cpu_number',
'nice': 0.0,
'softirq': 0.0,
'steal': 0.0,
'system': 2.0,
'total': 90.0,
'user': 67.0}]
Get a specific field:: Get a specific field::
@ -473,7 +511,7 @@ Get plugin stats::
'port': 0, 'port': 0,
'refresh': 30, 'refresh': 30,
'rtt_warning': None, 'rtt_warning': None,
'status': 0.006751, 'status': 0.007373,
'timeout': 3}] 'timeout': 3}]
Get a specific field:: Get a specific field::
@ -490,7 +528,7 @@ Get a specific item when field matchs the given value::
'port': 0, 'port': 0,
'refresh': 30, 'refresh': 30,
'rtt_warning': None, 'rtt_warning': None,
'status': 0.006751, 'status': 0.007373,
'timeout': 3}]} 'timeout': 3}]}
GET processcount GET processcount
@ -499,12 +537,12 @@ GET processcount
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/processcount # curl http://localhost:61208/api/3/processcount
{'pid_max': 0, 'running': 1, 'sleeping': 275, 'thread': 1301, 'total': 337} {'pid_max': 0, 'running': 1, 'sleeping': 285, 'thread': 1568, 'total': 353}
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/processcount/total # curl http://localhost:61208/api/3/processcount/total
{'total': 337} {'total': 353}
GET processlist GET processlist
--------------- ---------------
@ -538,12 +576,12 @@ Get plugin stats::
'--shared-files=v8_context_snapshot_data:100', '--shared-files=v8_context_snapshot_data:100',
'--vscode-window-config=vscode:662562c7-385c-48ce-8810-0faf0271b42a'], '--vscode-window-config=vscode:662562c7-385c-48ce-8810-0faf0271b42a'],
'cpu_percent': 0.0, 'cpu_percent': 0.0,
'cpu_times': pcputimes(user=2571.17, system=207.22, children_user=7.67, children_system=1.78, iowait=1.73), 'cpu_times': pcputimes(user=2920.73, system=230.07, children_user=9.05, children_system=2.1, iowait=2.94),
'gids': pgids(real=1000, effective=1000, saved=1000), 'gids': pgids(real=1000, effective=1000, saved=1000),
'io_counters': [360120320, 18550784, 0, 0, 0], 'io_counters': [614957056, 18755584, 0, 0, 0],
'key': 'pid', 'key': 'pid',
'memory_info': pmem(rss=949338112, vms=54797201408, shared=102637568, text=125108224, lib=0, data=1186004992, dirty=0), 'memory_info': pmem(rss=1157496832, vms=54968766464, shared=81698816, text=125108224, lib=0, data=1443426304, dirty=0),
'memory_percent': 12.09498686246422, 'memory_percent': 14.747020897422852,
'name': 'code', 'name': 'code',
'nice': 0, 'nice': 0,
'num_threads': 20, 'num_threads': 20,
@ -554,15 +592,15 @@ Get plugin stats::
'username': 'nicolargo'}, 'username': 'nicolargo'},
{'cmdline': ['/usr/lib/firefox/firefox', '-new-window'], {'cmdline': ['/usr/lib/firefox/firefox', '-new-window'],
'cpu_percent': 0.0, 'cpu_percent': 0.0,
'cpu_times': pcputimes(user=15196.71, system=4955.35, children_user=11265.99, children_system=2186.87, iowait=5.58), 'cpu_times': pcputimes(user=19063.26, system=6137.23, children_user=12397.16, children_system=2423.4, iowait=7.35),
'gids': pgids(real=1000, effective=1000, saved=1000), 'gids': pgids(real=1000, effective=1000, saved=1000),
'io_counters': [4802985984, 20089364480, 0, 0, 0], 'io_counters': [6021562368, 24573427712, 0, 0, 0],
'key': 'pid', 'key': 'pid',
'memory_info': pmem(rss=908435456, vms=5202051072, shared=119873536, text=626688, lib=0, data=1518735360, dirty=0), 'memory_info': pmem(rss=629800960, vms=5408382976, shared=170909696, text=626688, lib=0, data=1499762688, dirty=0),
'memory_percent': 11.573868958625242, 'memory_percent': 8.023942408800453,
'name': 'firefox', 'name': 'firefox',
'nice': 0, 'nice': 0,
'num_threads': 152, 'num_threads': 186,
'pid': 5637, 'pid': 5637,
'ppid': 3847, 'ppid': 3847,
'status': 'S', 'status': 'S',
@ -577,178 +615,188 @@ Get a specific field::
5755, 5755,
5895, 5895,
239766, 239766,
4092,
5946, 5946,
281859, 4092,
462733,
239606, 239606,
238929, 459136,
238897, 490976,
207471, 489301,
239618,
238993,
375431,
391948,
5798,
391799,
178587,
3336,
2259,
360036,
3934,
396921,
239023,
374111,
18486, 18486,
3913, 480546,
270468, 238929,
4121, 459784,
3855, 465560,
211213, 281859,
238897,
476035,
239618,
490348,
5798,
238993,
68322, 68322,
390101, 178587,
227849, 487310,
459802,
459989,
3934,
491915,
3913,
481575,
239023,
270468,
374111,
2259,
3855,
3336,
348, 348,
211213,
238947,
2430, 2430,
4181, 4181,
238947, 1300,
483055,
4928,
6053, 6053,
150281, 150281,
3853, 3853,
390100,
4928,
4241, 4241,
4374, 483057,
4265,
1139, 1139,
4265,
1, 1,
4266, 4266,
4261, 4261,
237994,
4152,
373165,
138395, 138395,
4143, 4121,
1180, 237994,
4287,
1158,
1285,
373164,
4196,
4116, 4116,
4264, 4143,
1158,
4374,
483096,
4152,
1180,
1285,
4287,
2216,
3847, 3847,
4164, 4164,
238900,
4274,
3890,
2216,
3764,
4284, 4284,
4123, 396199,
238901, 238900,
4078, 483094,
255840,
4267,
1575,
2208,
3863, 3863,
1300, 3890,
344713, 4123,
1354, 4274,
238901,
4264,
1138,
1324,
3764,
1008, 1008,
1121, 1121,
172714,
396199,
1138,
1153, 1153,
4262,
4129,
4340,
4279,
4332,
3959, 3959,
2394,
3858,
3908,
4263,
4339,
1176,
4343,
5587,
3896,
4252,
4276,
4281,
3932,
3921,
1181,
3927,
4137,
4273,
3902,
1324,
5573,
4160, 4160,
3858,
4332,
2208,
1575,
3868,
1354,
4196,
4078,
4343,
4267,
4279,
4262,
4340,
4263,
344713,
5587,
2394,
3927,
4129,
255840,
1176,
2406,
3932,
4339,
4281,
172714,
4252,
3921,
18537,
239661, 239661,
4273,
4276,
3896,
3902,
459949,
4048, 4048,
4120, 4120,
2406, 4137,
3868,
18537,
1178,
4272,
1173, 1173,
4285,
5573,
1181,
4272,
4057, 4057,
4260, 4260,
4285,
1147,
1166,
67406, 67406,
3883, 1178,
1130, 1147,
207437,
1150, 1150,
37983, 37983,
4062,
1010,
4072,
37989,
1182,
1129, 1129,
344711, 459734,
1007, 3908,
37992, 4072,
1010,
4062,
3883,
4141, 4141,
187870, 1166,
1135, 37989,
6521, 6521,
2403, 1130,
396907, 459752,
3339, 37992,
1451, 1007,
1209, 344711,
1135,
187870,
1163, 1163,
491873,
1182,
1209,
1451,
138445, 138445,
3339,
2230, 2230,
213050, 2403,
459705,
37995, 37995,
213050,
344710, 344710,
2404, 459720,
4601,
1122, 1122,
396920, 4601,
491914,
2229, 2229,
2035, 2035,
238903, 2404,
3848, 3848,
997, 997,
375,
1335,
2235, 2235,
1335,
1214, 1214,
4029, 375,
213333, 213333,
1132, 238903,
4029,
2, 2,
3, 3,
4, 4,
@ -771,7 +819,6 @@ Get a specific field::
28, 28,
29, 29,
30, 30,
32,
33, 33,
34, 34,
35, 35,
@ -823,7 +870,6 @@ Get a specific field::
364, 364,
398, 398,
399, 399,
400,
424, 424,
425, 425,
426, 426,
@ -845,11 +891,11 @@ Get a specific field::
781, 781,
904, 904,
915, 915,
928,
932, 932,
939, 939,
947, 947,
958, 958,
1132,
1347, 1347,
1432, 1432,
1433, 1433,
@ -887,28 +933,36 @@ Get a specific field::
217976, 217976,
264756, 264756,
354417, 354417,
358559,
378648, 378648,
378848, 378848,
379044, 379044,
379176, 379176,
379506, 379506,
382462,
389912,
389957,
389975, 389975,
390957, 425005,
391483, 439123,
392032, 439461,
392469, 459971,
392694, 460998,
392871, 478806,
394604, 482831,
394716, 482922,
395296, 482954,
395988, 483095,
396037, 484996,
396492]} 486264,
486448,
487343,
487746,
487752,
488822,
489960,
490238,
490292,
490396,
490397,
490398,
490570]}
Get a specific item when field matchs the given value:: Get a specific item when field matchs the given value::
@ -939,18 +993,18 @@ Get a specific item when field matchs the given value::
'--shared-files=v8_context_snapshot_data:100', '--shared-files=v8_context_snapshot_data:100',
'--vscode-window-config=vscode:662562c7-385c-48ce-8810-0faf0271b42a'], '--vscode-window-config=vscode:662562c7-385c-48ce-8810-0faf0271b42a'],
'cpu_percent': 0.0, 'cpu_percent': 0.0,
'cpu_times': [2571.17, 207.22, 7.67, 1.78, 1.73], 'cpu_times': [2920.73, 230.07, 9.05, 2.1, 2.94],
'gids': [1000, 1000, 1000], 'gids': [1000, 1000, 1000],
'io_counters': [360120320, 18550784, 0, 0, 0], 'io_counters': [614957056, 18755584, 0, 0, 0],
'key': 'pid', 'key': 'pid',
'memory_info': [949338112, 'memory_info': [1157496832,
54797201408, 54968766464,
102637568, 81698816,
125108224, 125108224,
0, 0,
1186004992, 1443426304,
0], 0],
'memory_percent': 12.09498686246422, 'memory_percent': 14.747020897422852,
'name': 'code', 'name': 'code',
'nice': 0, 'nice': 0,
'num_threads': 20, 'num_threads': 20,
@ -974,69 +1028,69 @@ GET quicklook
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/quicklook # curl http://localhost:61208/api/3/quicklook
{'cpu': 21.3, {'cpu': 29.4,
'cpu_hz': 3000000000.0, 'cpu_hz': 3000000000.0,
'cpu_hz_current': 1981076000.0, 'cpu_hz_current': 2330060000.0,
'cpu_name': 'Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz', 'cpu_name': 'Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz',
'mem': 78.7, 'mem': 82.0,
'percpu': [{'cpu_number': 0, 'percpu': [{'cpu_number': 0,
'guest': 0.0, 'guest': 0.0,
'guest_nice': 0.0, 'guest_nice': 0.0,
'idle': 92.9, 'idle': 74.0,
'iowait': 0.0, 'iowait': 0.0,
'irq': 0.0, 'irq': 0.0,
'key': 'cpu_number', 'key': 'cpu_number',
'nice': 0.0, 'nice': 0.0,
'softirq': 1.8, 'softirq': 0.0,
'steal': 0.0, 'steal': 0.0,
'system': 1.8, 'system': 6.0,
'total': 7.1, 'total': 26.0,
'user': 3.6}, 'user': 5.0},
{'cpu_number': 1, {'cpu_number': 1,
'guest': 0.0, 'guest': 0.0,
'guest_nice': 0.0, 'guest_nice': 0.0,
'idle': 35.5, 'idle': 10.0,
'iowait': 0.0, 'iowait': 0.0,
'irq': 0.0, 'irq': 0.0,
'key': 'cpu_number', 'key': 'cpu_number',
'nice': 0.0, 'nice': 0.0,
'softirq': 0.0, 'softirq': 0.0,
'steal': 0.0, 'steal': 0.0,
'system': 1.8, 'system': 2.0,
'total': 64.5, 'total': 90.0,
'user': 62.7}, 'user': 67.0},
{'cpu_number': 2, {'cpu_number': 2,
'guest': 0.0, 'guest': 0.0,
'guest_nice': 0.0, 'guest_nice': 0.0,
'idle': 94.5, 'idle': 74.0,
'iowait': 0.0, 'iowait': 0.0,
'irq': 0.0, 'irq': 0.0,
'key': 'cpu_number', 'key': 'cpu_number',
'nice': 0.0, 'nice': 0.0,
'softirq': 4.0,
'steal': 0.0,
'system': 4.0,
'total': 26.0,
'user': 4.0},
{'cpu_number': 3,
'guest': 0.0,
'guest_nice': 0.0,
'idle': 76.0,
'iowait': 1.0,
'irq': 0.0,
'key': 'cpu_number',
'nice': 0.0,
'softirq': 0.0, 'softirq': 0.0,
'steal': 0.0, 'steal': 0.0,
'system': 1.8, 'system': 3.0,
'total': 5.5, 'total': 24.0,
'user': 3.6}, 'user': 5.0}],
{'cpu_number': 3, 'swap': 24.3}
'guest': 0.0,
'guest_nice': 0.0,
'idle': 92.1,
'iowait': 0.0,
'irq': 0.0,
'key': 'cpu_number',
'nice': 0.0,
'softirq': 5.3,
'steal': 0.0,
'system': 0.0,
'total': 7.9,
'user': 2.6}],
'swap': 24.2}
Get a specific field:: Get a specific field::
# curl http://localhost:61208/api/3/quicklook/cpu # curl http://localhost:61208/api/3/quicklook/cpu
{'cpu': 21.3} {'cpu': 29.4}
GET sensors GET sensors
----------- -----------
@ -1107,7 +1161,7 @@ GET uptime
Get plugin stats:: Get plugin stats::
# curl http://localhost:61208/api/3/uptime # curl http://localhost:61208/api/3/uptime
{'seconds': 6356375} {'seconds': 6870587}
GET all stats GET all stats
------------- -------------
@ -1123,33 +1177,33 @@ GET stats history
History of a plugin:: History of a plugin::
# curl http://localhost:61208/api/3/cpu/history # curl http://localhost:61208/api/3/cpu/history
{'system': [['2021-11-22T11:55:10.692740', 2.0], {'system': [['2021-11-28T10:45:25.412479', 5.3],
['2021-11-22T11:55:11.739644', 2.0], ['2021-11-28T10:45:26.495214', 5.3],
['2021-11-22T11:55:12.830642', 1.5]], ['2021-11-28T10:45:27.605090', 4.2]],
'user': [['2021-11-22T11:55:10.692735', 15.8], 'user': [['2021-11-28T10:45:25.412472', 22.9],
['2021-11-22T11:55:11.739640', 15.8], ['2021-11-28T10:45:26.495210', 22.9],
['2021-11-22T11:55:12.830638', 3.0]]} ['2021-11-28T10:45:27.605086', 9.0]]}
Limit history to last 2 values:: Limit history to last 2 values::
# curl http://localhost:61208/api/3/cpu/history/2 # curl http://localhost:61208/api/3/cpu/history/2
{'system': [['2021-11-22T11:55:11.739644', 2.0], {'system': [['2021-11-28T10:45:26.495214', 5.3],
['2021-11-22T11:55:12.830642', 1.5]], ['2021-11-28T10:45:27.605090', 4.2]],
'user': [['2021-11-22T11:55:11.739640', 15.8], 'user': [['2021-11-28T10:45:26.495210', 22.9],
['2021-11-22T11:55:12.830638', 3.0]]} ['2021-11-28T10:45:27.605086', 9.0]]}
History for a specific field:: History for a specific field::
# curl http://localhost:61208/api/3/cpu/system/history # curl http://localhost:61208/api/3/cpu/system/history
{'system': [['2021-11-22T11:55:10.692740', 2.0], {'system': [['2021-11-28T10:45:25.412479', 5.3],
['2021-11-22T11:55:11.739644', 2.0], ['2021-11-28T10:45:26.495214', 5.3],
['2021-11-22T11:55:12.830642', 1.5]]} ['2021-11-28T10:45:27.605090', 4.2]]}
Limit history for a specific field to last 2 values:: Limit history for a specific field to last 2 values::
# curl http://localhost:61208/api/3/cpu/system/history # curl http://localhost:61208/api/3/cpu/system/history
{'system': [['2021-11-22T11:55:11.739644', 2.0], {'system': [['2021-11-28T10:45:26.495214', 5.3],
['2021-11-22T11:55:12.830642', 1.5]]} ['2021-11-28T10:45:27.605090', 4.2]]}
GET limits (used for thresholds) GET limits (used for thresholds)
-------------------------------- --------------------------------

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText. .\" Man page generated from reStructuredText.
. .
.TH "GLANCES" "1" "Nov 22, 2021" "3.2.5_beta01" "Glances" .TH "GLANCES" "1" "Nov 28, 2021" "3.2.5_beta01" "Glances"
.SH NAME .SH NAME
glances \- An eye on your system glances \- An eye on your system
. .