diff options
Diffstat (limited to 'docs/api.rst')
-rw-r--r-- | docs/api.rst | 721 |
1 files changed, 456 insertions, 265 deletions
diff --git a/docs/api.rst b/docs/api.rst index f1fd5a5b..e7285669 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -141,7 +141,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 1.0572876930236816}, + "timer": 0.3663492202758789}, {"count": 0, "countmax": 20.0, "countmin": None, @@ -150,7 +150,7 @@ Get plugin stats:: "refresh": 3.0, "regex": True, "result": None, - "timer": 1.0569162368774414}] + "timer": 0.36623501777648926}] Fields descriptions: @@ -178,7 +178,7 @@ Get a specific item when field matches the given value:: "refresh": 3.0, "regex": True, "result": None, - "timer": 1.0572876930236816}]} + "timer": 0.3663492202758789}]} GET cloud --------- @@ -219,25 +219,23 @@ GET containers Get plugin stats:: # curl http://localhost:61208/api/4/containers - [{"command": "/portainer", + [{"command": "tail -f /dev/null", "cpu": {"total": 0.0}, "cpu_percent": 0.0, - "created": "2022-10-29T14:59:10.266701439Z", + "created": "2024-05-06T08:20:31.859934699Z", "engine": "docker", - "id": "3abd51c615968482d9ccff5afc629f267f6dda113ed68b75b432615fae3b49fb", - "image": ["portainer/portainer-ce:2.9.3"], - "io": {"cumulative_ior": 31543296, "cumulative_iow": 6189056}, + "id": "f8d78b334f789955ab6dd0739c0bbb7e26ae3f24ed9e42c4a0d218a30377d2c8", + "image": ["catthehacker/ubuntu:act-22.04"], + "io": {"cumulative_ior": 100855808, "cumulative_iow": 0}, "key": "name", - "memory": {"cache": None, - "limit": 7823499264, - "max_usage": None, - "rss": None, - "usage": 21929984}, - "memory_usage": 21929984, - "name": "portainer", - "network": {"cumulative_rx": 809260, "cumulative_tx": 0}, + "memory": {"inactive_file": 101560320, + "limit": 16422473728, + "usage": 138932224}, + "memory_usage": 138932224, + "name": "act-test-test-freebsd-700362a4fd49fe930f7ab89909c5ca853cd3a832c27b6ac4e363947b0dd29bef", + "network": {}, "status": "running", - "uptime": "yesterday"}] + "uptime": "5 days"}] Fields descriptions: @@ -261,30 +259,32 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/containers/name - {"name": ["portainer"]} + {"name": ["act-test-test-freebsd-700362a4fd49fe930f7ab89909c5ca853cd3a832c27b6ac4e363947b0dd29bef"]} Get a specific item when field matches the given value:: - # curl http://localhost:61208/api/4/containers/name/portainer - {"portainer": [{"command": "/portainer", - "cpu": {"total": 0.0}, - "cpu_percent": 0.0, - "created": "2022-10-29T14:59:10.266701439Z", - "engine": "docker", - "id": "3abd51c615968482d9ccff5afc629f267f6dda113ed68b75b432615fae3b49fb", - "image": ["portainer/portainer-ce:2.9.3"], - "io": {"cumulative_ior": 31543296, "cumulative_iow": 6189056}, - "key": "name", - "memory": {"cache": None, - "limit": 7823499264, - "max_usage": None, - "rss": None, - "usage": 21929984}, - "memory_usage": 21929984, - "name": "portainer", - "network": {"cumulative_rx": 809260, "cumulative_tx": 0}, - "status": "running", - "uptime": "yesterday"}]} + # curl http://localhost:61208/api/4/containers/name/act-test-test-freebsd-700362a4fd49fe930f7ab89909c5ca853cd3a832c27b6ac4e363947b0dd29bef + {"act-test-test-freebsd-700362a4fd49fe930f7ab89909c5ca853cd3a832c27b6ac4e363947b0dd29bef": [{"command": "tail " + "-f " + "/dev/null", + "cpu": {"total": 0.0}, + "cpu_percent": 0.0, + "created": "2024-05-06T08:20:31.859934699Z", + "engine": "docker", + "id": "f8d78b334f789955ab6dd0739c0bbb7e26ae3f24ed9e42c4a0d218a30377d2c8", + "image": ["catthehacker/ubuntu:act-22.04"], + "io": {"cumulative_ior": 100855808, + "cumulative_iow": 0}, + "key": "name", + "memory": {"inactive_file": 101560320, + "limit": 16422473728, + "usage": 138932224}, + "memory_usage": 138932224, + "name": "act-test-test-freebsd-700362a4fd49fe930f7ab89909c5ca853cd3a832c27b6ac4e363947b0dd29bef", + "network": {}, + "status": "running", + "uptime": "5 " + "days"}]} GET core -------- @@ -292,7 +292,7 @@ GET core Get plugin stats:: # curl http://localhost:61208/api/4/core - {"log": 4, "phys": 2} + {"log": 16, "phys": 10} Fields descriptions: @@ -302,7 +302,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/core/phys - {"phys": 2} + {"phys": 10} GET cpu ------- @@ -310,20 +310,20 @@ GET cpu Get plugin stats:: # curl http://localhost:61208/api/4/cpu - {"cpucore": 4, - "ctx_switches": 49762424, + {"cpucore": 16, + "ctx_switches": 417599944, "guest": 0.0, - "idle": 69.2, - "interrupts": 21528778, - "iowait": 1.7, + "idle": 4.0, + "interrupts": 374317125, + "iowait": 0.0, "irq": 0.0, "nice": 0.0, - "soft_interrupts": 14048210, + "soft_interrupts": 133208497, "steal": 0.0, "syscalls": 0, - "system": 5.6, - "total": 29.1, - "user": 23.2} + "system": 0.0, + "total": 25.0, + "user": 0.0} Fields descriptions: @@ -356,7 +356,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/cpu/total - {"total": 29.1} + {"total": 25.0} GET diskio ---------- @@ -364,18 +364,18 @@ GET diskio Get plugin stats:: # curl http://localhost:61208/api/4/diskio - [{"disk_name": "sda", + [{"disk_name": "nvme0n1", "key": "disk_name", - "read_bytes": 5258122240, - "read_count": 180256, - "write_bytes": 4720267264, - "write_count": 137068}, - {"disk_name": "sda1", + "read_bytes": 7890098688, + "read_count": 344619, + "write_bytes": 24110978048, + "write_count": 1078819}, + {"disk_name": "nvme0n1p1", "key": "disk_name", - "read_bytes": 3715072, - "read_count": 123, - "write_bytes": 0, - "write_count": 19}] + "read_bytes": 7484416, + "read_count": 592, + "write_bytes": 1024, + "write_count": 2}] Fields descriptions: @@ -397,17 +397,22 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/diskio/disk_name - {"disk_name": ["sda", "sda1", "sda2", "sda5", "dm-0", "dm-1"]} + {"disk_name": ["nvme0n1", + "nvme0n1p1", + "nvme0n1p2", + "nvme0n1p3", + "dm-0", + "dm-1"]} Get a specific item when field matches the given value:: - # curl http://localhost:61208/api/4/diskio/disk_name/sda - {"sda": [{"disk_name": "sda", - "key": "disk_name", - "read_bytes": 5258122240, - "read_count": 180256, - "write_bytes": 4720267264, - "write_count": 137068}]} + # curl http://localhost:61208/api/4/diskio/disk_name/nvme0n1 + {"nvme0n1": [{"disk_name": "nvme0n1", + "key": "disk_name", + "read_bytes": 7890098688, + "read_count": 344619, + "write_bytes": 24110978048, + "write_count": 1078819}]} GET folders ----------- @@ -433,22 +438,14 @@ GET fs Get plugin stats:: # curl http://localhost:61208/api/4/fs - [{"device_name": "/dev/mapper/ubuntu--gnome--vg-root", - "free": 36169797632, + [{"device_name": "/dev/mapper/ubuntu--vg-ubuntu--lv", + "free": 905225412608, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", - "percent": 84.3, - "size": 243334156288, - "used": 194776903680}, - {"device_name": "zsfpool", - "free": 31195136, - "fs_type": "zfs", - "key": "mnt_point", - "mnt_point": "/zsfpool", - "percent": 25.4, - "size": 41811968, - "used": 10616832}] + "percent": 5.0, + "size": 1003736440832, + "used": 47448522752}] Fields descriptions: @@ -463,19 +460,19 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/fs/mnt_point - {"mnt_point": ["/", "/zsfpool", "/var/snap/firefox/common/host-hunspell"]} + {"mnt_point": ["/"]} Get a specific item when field matches the given value:: # curl http://localhost:61208/api/4/fs/mnt_point// - {"/": [{"device_name": "/dev/mapper/ubuntu--gnome--vg-root", - "free": 36169797632, + {"/": [{"device_name": "/dev/mapper/ubuntu--vg-ubuntu--lv", + "free": 905225412608, "fs_type": "ext4", "key": "mnt_point", "mnt_point": "/", - "percent": 84.3, - "size": 243334156288, - "used": 194776903680}]} + "percent": 5.0, + "size": 1003736440832, + "used": 47448522752}]} GET gpu ------- @@ -508,8 +505,8 @@ GET ip Get plugin stats:: # curl http://localhost:61208/api/4/ip - {"address": "192.168.0.32", - "gateway": "192.168.0.254", + {"address": "192.168.1.26", + "gateway": "192.168.1.1", "mask": "255.255.255.0", "mask_cidr": 24, "public_address": "", @@ -527,7 +524,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/ip/gateway - {"gateway": "192.168.0.254"} + {"gateway": "192.168.1.1"} GET irq ------- @@ -548,10 +545,10 @@ GET load Get plugin stats:: # curl http://localhost:61208/api/4/load - {"cpucore": 4, - "min1": 2.4365234375, - "min15": 1.41748046875, - "min5": 1.76123046875} + {"cpucore": 16, + "min1": 1.19580078125, + "min15": 0.728515625, + "min5": 0.9990234375} Fields descriptions: @@ -563,7 +560,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/load/min1 - {"min1": 2.4365234375} + {"min1": 1.19580078125} GET mem ------- @@ -571,16 +568,16 @@ GET mem Get plugin stats:: # curl http://localhost:61208/api/4/mem - {"active": 1829126144, - "available": 2252705792, - "buffers": 195567616, - "cached": 2715656192, - "free": 2252705792, - "inactive": 4596236288, - "percent": 71.2, - "shared": 777666560, - "total": 7823499264, - "used": 5570793472} + {"active": 8123240448, + "available": 7505043456, + "buffers": 322965504, + "cached": 7686283264, + "free": 7505043456, + "inactive": 5349273600, + "percent": 54.3, + "shared": 1051676672, + "total": 16422473728, + "used": 8917430272} Fields descriptions: @@ -599,7 +596,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/mem/total - {"total": 7823499264} + {"total": 16422473728} GET memswap ----------- @@ -607,13 +604,13 @@ GET memswap Get plugin stats:: # curl http://localhost:61208/api/4/memswap - {"free": 7855878144, - "percent": 2.8, - "sin": 10948608, - "sout": 235782144, + {"free": 4288409600, + "percent": 0.2, + "sin": 4096, + "sout": 4055040, "time_since_update": 1, - "total": 8082419712, - "used": 226541568} + "total": 4294963200, + "used": 6553600} Fields descriptions: @@ -628,7 +625,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/memswap/total - {"total": 8082419712} + {"total": 4294963200} GET network ----------- @@ -638,26 +635,15 @@ Get plugin stats:: # curl http://localhost:61208/api/4/network [{"alias": None, "bytes_all": 0, - "bytes_all_gauge": 535068344, + "bytes_all_gauge": 5895221761, "bytes_recv": 0, - "bytes_recv_gauge": 499170928, + "bytes_recv_gauge": 5571082392, "bytes_sent": 0, - "bytes_sent_gauge": 35897416, - "interface_name": "wlp2s0", + "bytes_sent_gauge": 324139369, + "interface_name": "wlp0s20f3", "key": "interface_name", "speed": 0, - "time_since_update": 0.8122844696044922}, - {"alias": None, - "bytes_all": 0, - "bytes_all_gauge": 0, - "bytes_recv": 0, - "bytes_recv_gauge": 0, - "bytes_sent": 0, - "bytes_sent_gauge": 0, - "interface_name": "br-40875d2e2716", - "key": "interface_name", - "speed": 0, - "time_since_update": 0.8122844696044922}] + "time_since_update": 0.37969160079956055}] Fields descriptions: @@ -679,29 +665,22 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/network/interface_name - {"interface_name": ["wlp2s0", - "br-40875d2e2716", - "br_grafana", - "veth0785bc8", - "lxdbr0", - "vethe9985946", - "veth20c434a2", - "mpqemubr0"]} + {"interface_name": ["wlp0s20f3"]} Get a specific item when field matches the given value:: - # curl http://localhost:61208/api/4/network/interface_name/wlp2s0 - {"wlp2s0": [{"alias": None, - "bytes_all": 0, - "bytes_all_gauge": 535068344, - "bytes_recv": 0, - "bytes_recv_gauge": 499170928, - "bytes_sent": 0, - "bytes_sent_gauge": 35897416, - "interface_name": "wlp2s0", - "key": "interface_name", - "speed": 0, - "time_since_update": 0.8122844696044922}]} + # curl http://localhost:61208/api/4/network/interface_name/wlp0s20f3 + {"wlp0s20f3": [{"alias": None, + "bytes_all": 0, + "bytes_all_gauge": 5895221761, + "bytes_recv": 0, + "bytes_recv_gauge": 5571082392, + "bytes_sent": 0, + "bytes_sent_gauge": 324139369, + "interface_name": "wlp0s20f3", + "key": "interface_name", + "speed": 0, + "time_since_update": 0.37969160079956055}]} GET now ------- @@ -709,7 +688,17 @@ GET now Get plugin stats:: # curl http://localhost:61208/api/4/now - "2024-04-21 16:51:51 CEST" + {"custom": "2024-05-12 09:32:48 CEST", "iso": "2024-05-12T09:32:48+02:00"} + +Fields descriptions: + +* **custom**: Current date in custom format (unit is *None*) +* **iso**: Current date in ISO 8601 format (unit is *None*) + +Get a specific field:: + + # curl http://localhost:61208/api/4/now/iso + {"iso": "2024-05-12T09:32:48+02:00"} GET percpu ---------- @@ -720,29 +709,29 @@ Get plugin stats:: [{"cpu_number": 0, "guest": 0.0, "guest_nice": 0.0, - "idle": 84.4, - "iowait": 0.6, + "idle": 0.0, + "iowait": 0.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 3.9, - "total": 15.6, - "user": 11.2}, + "system": 0.0, + "total": 100.0, + "user": 1.0}, {"cpu_number": 1, "guest": 0.0, "guest_nice": 0.0, - "idle": 52.8, - "iowait": 1.7, + "idle": 1.0, + "iowait": 0.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 5.6, - "total": 47.2, - "user": 40.0}] + "system": 0.0, + "total": 99.0, + "user": 0.0}] Fields descriptions: @@ -762,7 +751,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/percpu/cpu_number - {"cpu_number": [0, 1, 2, 3]} + {"cpu_number": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]} GET ports --------- @@ -771,12 +760,12 @@ Get plugin stats:: # curl http://localhost:61208/api/4/ports [{"description": "DefaultGateway", - "host": "192.168.0.254", + "host": "192.168.1.1", "indice": "port_0", "port": 0, "refresh": 30, "rtt_warning": None, - "status": 0.007086, + "status": 0.00664, "timeout": 3}] Fields descriptions: @@ -793,19 +782,19 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/ports/host - {"host": ["192.168.0.254"]} + {"host": ["192.168.1.1"]} Get a specific item when field matches the given value:: - # curl http://localhost:61208/api/4/ports/host/192.168.0.254 - {"192.168.0.254": [{"description": "DefaultGateway", - "host": "192.168.0.254", - "indice": "port_0", - "port": 0, - "refresh": 30, - "rtt_warning": None, - "status": 0.007086, - "timeout": 3}]} + # curl http://localhost:61208/api/4/ports/host/192.168.1.1 + {"192.168.1.1": [{"description": "DefaultGateway", + "host": "192.168.1.1", + "indice": "port_0", + "port": 0, + "refresh": 30, + "rtt_warning": None, + "status": 0.00664, + "timeout": 3}]} GET processcount ---------------- @@ -813,7 +802,7 @@ GET processcount Get plugin stats:: # curl http://localhost:61208/api/4/processcount - {"pid_max": 0, "running": 1, "sleeping": 321, "thread": 1477, "total": 391} + {"pid_max": 0, "running": 1, "sleeping": 290, "thread": 1643, "total": 432} Fields descriptions: @@ -826,7 +815,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/processcount/total - {"total": 391} + {"total": 432} GET processlist --------------- @@ -866,67 +855,223 @@ GET quicklook Get plugin stats:: # curl http://localhost:61208/api/4/quicklook - {"cpu": 29.1, - "cpu_hz": 2025000000.0, - "cpu_hz_current": 1574552500.0, - "cpu_log_core": 4, - "cpu_name": "Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz", - "cpu_phys_core": 2, - "load": 35.4, - "mem": 71.2, + {"cpu": 25.0, + "cpu_hz": 4475000000.0, + "cpu_hz_current": 1170889250.0, + "cpu_log_core": 16, + "cpu_name": "13th Gen Intel(R) Core(TM) i7-13620H", + "cpu_phys_core": 10, + "load": 4.6, + "mem": 54.3, "percpu": [{"cpu_number": 0, "guest": 0.0, "guest_nice": 0.0, - "idle": 84.4, - "iowait": 0.6, + "idle": 0.0, + "iowait": 0.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 3.9, - "total": 15.6, - "user": 11.2}, + "system": 0.0, + "total": 100.0, + "user": 1.0}, {"cpu_number": 1, "guest": 0.0, "guest_nice": 0.0, - "idle": 52.8, - "iowait": 1.7, + "idle": 1.0, + "iowait": 0.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 5.6, - "total": 47.2, - "user": 40.0}, + "system": 0.0, + "total": 99.0, + "user": 0.0}, {"cpu_number": 2, "guest": 0.0, "guest_nice": 0.0, - "idle": 62.8, - "iowait": 1.6, + "idle": 0.0, + "iowait": 0.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, - "softirq": 1.1, + "softirq": 0.0, "steal": 0.0, - "system": 6.6, - "total": 37.2, - "user": 27.9}, + "system": 0.0, + "total": 100.0, + "user": 0.0}, {"cpu_number": 3, "guest": 0.0, "guest_nice": 0.0, - "idle": 77.3, - "iowait": 2.8, + "idle": 0.0, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 100.0, + "user": 0.0}, + {"cpu_number": 4, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 0.0, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 100.0, + "user": 0.0}, + {"cpu_number": 5, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 0.0, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 100.0, + "user": 0.0}, + {"cpu_number": 6, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 0.0, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 100.0, + "user": 0.0}, + {"cpu_number": 7, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 0.0, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 100.0, + "user": 0.0}, + {"cpu_number": 8, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 1.0, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 99.0, + "user": 0.0}, + {"cpu_number": 9, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 0.0, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 100.0, + "user": 0.0}, + {"cpu_number": 10, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 0.0, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 100.0, + "user": 0.0}, + {"cpu_number": 11, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 0.0, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 100.0, + "user": 0.0}, + {"cpu_number": 12, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 0.0, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 100.0, + "user": 0.0}, + {"cpu_number": 13, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 0.0, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 100.0, + "user": 0.0}, + {"cpu_number": 14, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 0.0, + "iowait": 0.0, "irq": 0.0, "key": "cpu_number", "nice": 0.0, "softirq": 0.0, "steal": 0.0, - "system": 7.2, - "total": 22.7, - "user": 12.7}], - "swap": 2.8} + "system": 0.0, + "total": 100.0, + "user": 0.0}, + {"cpu_number": 15, + "guest": 0.0, + "guest_nice": 0.0, + "idle": 1.0, + "iowait": 0.0, + "irq": 0.0, + "key": "cpu_number", + "nice": 0.0, + "softirq": 0.0, + "steal": 0.0, + "system": 0.0, + "total": 99.0, + "user": 0.0}], + "swap": 0.2} Fields descriptions: @@ -943,7 +1088,7 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/quicklook/cpu_name - {"cpu_name": "Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz"} + {"cpu_name": "13th Gen Intel(R) Core(TM) i7-13620H"} GET raid -------- @@ -959,20 +1104,20 @@ GET sensors Get plugin stats:: # curl http://localhost:61208/api/4/sensors - [{"critical": 105, + [{"critical": None, "key": "label", - "label": "acpitz 0", + "label": "Ambient", "type": "temperature_core", "unit": "C", - "value": 27, - "warning": 105}, - {"critical": 105, + "value": 32, + "warning": 0}, + {"critical": None, "key": "label", - "label": "acpitz 1", + "label": "Ambient 3", "type": "temperature_core", "unit": "C", - "value": 29, - "warning": 105}] + "value": 26, + "warning": 0}] Fields descriptions: @@ -986,26 +1131,54 @@ Fields descriptions: Get a specific field:: # curl http://localhost:61208/api/4/sensors/label - {"label": ["acpitz 0", - "acpitz 1", - "Package id 0", - "Core 0", - "Core 1", + {"label": ["Ambient", + "Ambient 3", + "Ambient 5", + "Ambient 6", "CPU", - "Ambient", + "Composite", + "Core 0", + "Core 12", + "Core 16", + "Core 20", + "Core 28", + "Core 29", + "Core 30", + "Core 31", + "Core 4", + "Core 8", + "HDD", + "Package id 0", "SODIMM", + "Sensor 1", + "Sensor 2", + "dell_smm 0", + "dell_smm 1", + "dell_smm 2", + "dell_smm 3", + "dell_smm 4", + "dell_smm 5", + "dell_smm 6", + "dell_smm 7", + "dell_smm 8", + "dell_smm 9", + "iwlwifi_1 0", + "CPU Fan", + "Video Fan", + "dell_smm 0", + "dell_smm 1", "BAT BAT0"]} Get a specific item when field matches the given value:: - # curl http://localhost:61208/api/4/sensors/label/acpitz 0 - {"acpitz 0": [{"critical": 105, - "key": "label", - "label": "acpitz 0", - "type": "temperature_core", - "unit": "C", - "value": 27, - "warning": 105}]} + # curl http://localhost:61208/api/4/sensors/label/Ambient + {"Ambient": [{"critical": None, + "key": "label", + "label": "Ambient", + "type": "temperature_core", + "unit": "C", + "value": 32, + "warning": 0}]} GET smart --------- @@ -1021,11 +1194,11 @@ GET system Get plugin stats:: # curl http://localhost:61208/api/4/system - {"hostname": "XPS13-9333", - "hr_name": "Ubuntu 22.04 64bit / Linux 5.15.0-105-generic", - "linux_distro": "Ubuntu 22.04", + {"hostname": "nicolargo-xps15", + "hr_name": "Ubuntu 24.04 64bit / Linux 6.8.0-31-generic", + "linux_distro": "Ubuntu 24.04", "os_name": "Linux", - "os_version": "5.15.0-105-generic", + "os_version": "6.8.0-31-generic", "platform": "64bit"} Fields descriptions: @@ -1048,7 +1221,7 @@ GET uptime Get plugin stats:: # curl http://localhost:61208/api/4/uptime - "1 day, 5:31:59" + "6 days, 0:09:01" GET version ----------- @@ -1056,7 +1229,7 @@ GET version Get plugin stats:: # curl http://localhost:61208/api/4/version - "4.0.0_beta01" + "4.0.0_rc03" GET wifi -------- @@ -1064,7 +1237,23 @@ GET wifi Get plugin stats:: # curl http://localhost:61208/api/4/wifi - [] + [{"key": "ssid", + "quality_level": -63.0, + "quality_link": 47.0, + "ssid": "wlp0s20f3"}] + +Get a specific field:: + + # curl http://localhost:61208/api/4/wifi/ssid + {"ssid": ["wlp0s20f3"]} + +Get a specific item when field matches the given value:: + + # curl http://localhost:61208/api/4/wifi/ssid/wlp0s20f3 + {"wlp0s20f3": [{"key": "ssid", + "quality_level": -63.0, + "quality_link": 47.0, + "ssid": "wlp0s20f3"}]} GET all stats ------------- @@ -1108,34 +1297,34 @@ GET stats history History of a plugin:: # curl http://localhost:61208/api/4/cpu/history - {"system": [["2024-04-21T16:51:53.555669", 5.6], - ["2024-04-21T16:51:54.620159", 3.6], - ["2024-04-21T16:51:56.063781", 3.6]], - "user": [["2024-04-21T16:51:53.555642", 23.2], - ["2024-04-21T16:51:54.620131", 12.2], - ["2024-04-21T16:51:56.063754", 12.2]]} + {"system": [["2024-05-12T09:32:49.897081", 0.0], + ["2024-05-12T09:32:50.949869", 0.0], + ["2024-05-12T09:32:52.026236", 0.0]], + "user": [["2024-05-12T09:32:49.897070", 0.0], + ["2024-05-12T09:32:50.949864", 0.0], + ["2024-05-12T09:32:52.026226", 0.0]]} Limit history to last 2 values:: # curl http://localhost:61208/api/4/cpu/history/2 - {"system": [["2024-04-21T16:51:54.620159", 3.6], - ["2024-04-21T16:51:56.063781", 3.6]], - "user": [["2024-04-21T16:51:54.620131", 12.2], - ["2024-04-21T16:51:56.063754", 12.2]]} + {"system": [["2024-05-12T09:32: |