HosterCore icon indicating copy to clipboard operation
HosterCore copied to clipboard

Expose `smartmontools` output as a separate RestAPIv2 endpoint

Open yaroslav-gwit opened this issue 3 months ago • 0 comments

It would be useful to create a separate RestAPI endpoint (could be located at /host/smartctl, or somewhere similar), which displays the smarctl data for all the drives available on any given system. This data could be then passed down to an ML/AI pipeline in order to predict a disc failure, and/or displayed in the WebUI.

Future refs:

# Install the C++ version of the smartmontools
pkg install smartmontools

# Get the disk information in JSON format
smartctl -a /dev/ada0 --json

# List all available disks on the system
camcontrol devlist
geom disk list

# Start a background disk test (useful for cronjobs)
smartctl -t <short|long|conveyance|select> /dev/ada0

yaroslav-gwit avatar Apr 18 '24 20:04 yaroslav-gwit