[ { "name": "System", "static_key_variables": [ { "name": "Hostname", "command": "hostname" }, { "name": "Virtual Machine", "command": "echo $( [ \"$(systemd-detect-virt)\" = none ] && echo False || echo True )", "req_check": "False" }, { "name": "CPU Architecture", "command": "lscpu --json | jq -r '.lscpu[] | select(.field==\"Architecture:\") | .data'" }, { "name": "OS Kernel", "command": "uname -r" }, { "name": "OS Name", "command": "cat /etc/os-release | grep PRETTY | cut -d\\\" -f2" }, { "name": "Manufacturer", "command":{ "x86_64": "sudo dmidecode --type 1 | grep Manufacturer: | cut -d: -f2 | sed -e 's/^[ \\t]*//'", "aarch64": "" }, "arch_check": "true" }, { "name": "Product Name", "command": { "x86_64": "sudo dmidecode --type 2 | grep 'Product Name:' | cut -d: -f2 | sed -e 's/^[ \\t]*//'", "aarch64": "lshw -C system -json -disable NVMe -disable usb -disable 'PCI (Legacy)' -disable PCI -disable pci| jq -r '.[] | .product'" }, "arch_check": "true" }, { "name": "Serial Number", "command": { "x86_64": "sudo dmidecode --type 2 | grep 'Serial Number: '| cut -d: -f2 | sed -e 's/^[ \\t]*//'", "aarch64": "lshw -C system -json -disable NVMe -disable usb -disable 'PCI (Legacy)' -disable PCI -disable pci| jq -r '.[] | .serial'" }, "arch_check": "true" } ], "dynamic_key_variables": [ { "name": "System Uptime", "command": "uptime -p" }, { "name": "Current Date", "command": "date '+%D %r'" } ], "virt_ignore": [ "Product Name", "Serial Number" ] }, { "name": "CPU", "description": "{CPU Model} with {Core Count} cores.", "multi_check": "False", "properties": { "Core Count": "lscpu --json | jq -r '.lscpu[] | select(.field==\"CPU(s):\") | .data'", "CPU Model": "lscpu --json | jq -r '.lscpu[] | select(.field==\"Model name:\") | .data' | xargs", "Clock Speed": { "x86_64": "sudo dmesg | grep MHz | grep tsc | cut -d: -f2 | awk '{print $2 \" \" $3}'", "aarch64": "lscpu --json | jq -r '.lscpu[] | select(.field==\"CPU max MHz:\") | .data ' | xargs " } }, "notes": "clock speed doesn't work on ARM", "metrics": { "1m_load": "cat /proc/loadavg | awk '{{print $1}}'", "5m_load": "cat /proc/loadavg | awk '{{print $2}}'", "15m_load": "cat /proc/loadavg | awk '{{print $3}}'", "current_mhz": { "x86_64": "cat /proc/cpuinfo | grep MHz | cut -d: -f2 | awk '{{sum += $1}} END {{print sum/NR}}'", "aarch64": "echo unknown" } }, "arch_check": "True", "arch_variance": [ "current_mhz", "Clock Speed" ], "php_extra" :[ "CPU Model", "Core Count" ] }, { "name": "RAM", "description": "Total {Total GB}GB in {RAM Module Count} modules.", "multi_check": "False", "properties": { "Total GB": { "x86_64": "sudo /usr/bin/lshw -json -c memory -disable NVMe -disable usb | jq -r '.[] | select(.description==\"System Memory\").size' | awk '{{printf \"%.2f\\n\", $1/1073741824}}'", "aarch64": "sudo /usr/bin/lshw -json -c memory -disable NVMe -disable usb | jq -r '.[] | select(.description==\"System memory\").size' | awk '{{printf \"%.2f\\n\", $1/1073741824}}'" }, "RAM Module Count": { "x86_64": "sudo /usr/bin/lshw -json -c memory -disable NVMe -disable usb | jq -r '.[] | select(.id | contains(\"bank\")) | .id ' | wc -l" }, "RAM Type": { "x86_64": "sudo /usr/sbin/dmidecode --type 17 | grep Type: | sort -u | cut -d: -f2 | xargs", "aarch64": "echo none" }, "RAM Speed": { "x86_64": "sudo /usr/sbin/dmidecode --type 17 | grep Speed: | grep -v Configured | sort -u | cut -d: -f2 | xargs", "aarch64": "echo none" }, "RAM Voltage": { "x86_64": "sudo /usr/sbin/dmidecode --type 17 | grep 'Configured Voltage' | sort -u | cut -d: -f2 | xargs", "aarch64": "echo none" } }, "metrics": { "MB Used": "free -m | grep Mem | awk '{print $3}'", "MB Available": "free -m | grep Mem | awk '{print $7}'" }, "virt_ignore": [ "RAM Type", "RAM Speed", "RAM Voltage" ], "arch_check": "True", "arch_variance": [ "Total GB", "RAM Module Count", "RAM Type", "RAM Speed", "RAM Voltage" ], "php_extra" :[ "Total GB" ] }, { "name": "LAN", "description": "{Device Name} - {Device ID}", "multi_check": "True", "device_list": "ip link | grep default | grep -v -e docker -e 127.0.0.1 -e br- -e veth -e lo -e tun | cut -d ':' -f 2 | awk '{{print $1}}' ", "properties": { "MAC Address": "ip link | grep -A1 ' {this_device}' | grep ether | awk '{{print $2}}' || echo MAC missing", "Device Name": "echo {this_device}", "Device ID": "( udevadm info -q property -p $(ls -l /sys/class/net/ | grep {this_device} | cut -d '>' -f2 | cut -b 8-) | grep ID_MODEL_FROM_DATABASE || echo 'ID_MODEL_FROM_DATABASE=missing' ) | cut -d '=' -f2" }, "metrics": { "IP Address": "ip -o -4 ad | grep -v -e docker -e 127.0.0.1 -e br- -e tun | grep {this_device} | awk '{{print $4}}'", "Data Transmitted": "ifconfig {this_device} | grep RX | grep bytes | cut -d '(' -f2 | tr -d ')'", "Data Received": "ifconfig {this_device} | grep TX | grep bytes | cut -d '(' -f2 | tr -d ')'", "Link State": "cat /sys/class/net/{this_device}/operstate", "Link Speed": "cat /sys/class/net/{this_device}/speed || true" }, "multi_metrics": [ "IP Address" ] }, { "name": "VPN", "description": "{Device Name} - VPN Tunnel", "multi_check": "True", "precheck": "ip link | grep tun | wc -l", "device_list": "ip link | grep default | grep tun | cut -d ':' -f 2 | awk '{{print $1}}' ", "properties": { "Device Name": "echo {this_device}" }, "metrics": { "IP Address": "ip -o -4 ad | grep -v -e docker -e 127.0.0.1 -e br- | grep {this_device} | awk '{{print $4}}'", "Data Transmitted": "ifconfig {this_device} | grep RX | grep bytes | cut -d '(' -f2 | tr -d ')'", "Data Received": "ifconfig {this_device} | grep TX | grep bytes | cut -d '(' -f2 | tr -d ')'" } }, { "name": "NVGPU", "description": "NVGPU{Device ID} - {GPU Model} with {Memory Size}, Max Power {Maximum Power}", "multi_check": "True", "device_list": "nvidia-smi --query-gpu=index --format=csv,noheader,nounits", "properties": { "GPU Model": "nvidia-smi --id={this_device} --query-gpu=name --format=csv,noheader,nounits", "Device ID": "echo NVGPU{this_device}", "Driver Version": "nvidia-smi --id={this_device} --query-gpu=driver_version --format=csv,noheader,nounits", "Maximum Power": "nvidia-smi --id={this_device} --query-gpu=power.limit --format=csv,noheader,nounits", "Memory Size": "nvidia-smi --id={this_device} --query-gpu=memory.total --format=csv,noheader,nounits" }, "metrics": { "Power Draw": "nvidia-smi --id={this_device} --query-gpu=power.draw --format=csv,noheader,nounits", "Used Memory": "nvidia-smi --id={this_device} --query-gpu=memory.used --format=csv,noheader,nounits", "Temperature": "nvidia-smi --id={this_device} --query-gpu=temperature.gpu --format=csv,noheader,nounits", "GPU Load": "nvidia-smi --id={this_device} --query-gpu=utilization.gpu --format=csv,noheader,nounits" }, "precheck": "lspci | grep NVIDIA | wc -l", "php_extra" :[ "GPU Model" ] }, { "name": "STOR", "description": "{Device Path} is of type {Drive Type} with capacity of {Total Capacity}.", "multi_check": "True", "device_list": "lsblk -d -o NAME,SIZE | grep -v -e 0B -e NAME -e sr0| awk '{print $1}'", "properties": { "Device Name": "echo {this_device}", "Device Path": "echo /dev/{this_device}", "Drive Type": "lsblk -d -o NAME,TRAN | grep {this_device} | awk '{{print ($2 != \"\" ? $2 : \"missing\")}}'", "Total Capacity": "lsblk -d -o NAME,SIZE | grep {this_device} | awk '{{print $2}}'", "SMART Check": "sudo /usr/sbin/smartctl -x --json /dev/{this_device} | jq -r .smart_status.passed" }, "metrics": { "placeholder": "" } }, { "name": "MOUNT", "description": "Storage device {Device Location} mounted at {Storage Path} with {Total Space} total space", "multi_check": "True", "device_list": "df -h | grep -v -e 'Use%' -e tmpfs -e overlay -e efi -e udev | awk '{{print $1}}'", "properties": { "Device Location": "echo {this_device}", "Storage Path": "df -h | grep '{this_device} ' | awk '{{print $6}}'", "Total Space": "df -h | grep '{this_device} ' | awk '{{print $2}}'" }, "metrics": { "Free Space": "df -h | grep '{this_device} ' | awk '{{print $4}}' ", "Used Space": "df -h | grep '{this_device} ' | awk '{{print $3}}' " } }, { "name": "DVD", "description": "{Device Path} is a DVD or Virtual DVD drive.", "multi_check": "True", "device_list": "lsblk -d -o NAME,SIZE | grep sr0 | awk '{print $1}'", "properties": { "Device Name": "echo {this_device}", "Device Path": "lsblk -d -o NAME,SIZE | grep -v -e 0B -e NAME | awk '{{print \"/dev/\"$1}}' | grep {this_device}", "Total Capacity": "lsblk -d -o NAME,SIZE | grep {this_device} | awk '{{print $2}}'" }, "precheck": "lspci | grep sr0 | wc -l", "metrics": { "placeholder": "" } }, { "name": "BAT", "description": "Battery - {Device Name} - capacity {Capacity}", "multi_check": "True", "device_list": "acpi | grep Battery | cut -d: -f1", "properties": { "Device Name": "echo {this_device}", "Capacity": "acpi -V | jc --acpi | jq '.[] | select(.type==\"Battery\") | .design_capacity_mah' " }, "metrics": { "Percent Full": "acpi -V | jc --acpi | jq '.[] | select(.type==\"Battery\") | .charge_percent'", "State": "acpi -V | jc --acpi | jq '.[] | select(.type==\"Battery\") | .state'" }, "precheck": "acpi | grep Battery | wc -l" } ]