Monitor the hdd space of a usb disk attached on a raspberry pi in the same local network of HA

I have a raspberry pi 3b+ with Hassio 0.99.0 and I would like to monitor the space of an usb hdd mounted on another raspberry pi in the same local network. This other raspberry pi has Raspbian as OS.

Do you know a simple way to do that? I saw the ‘glances’ component though to my understanding it could only monitor the space of the entire raspberry pi while I am only interested to an hdd mounted on it.

You could use this custom component:

You would have to alter this sensor in the source file:

def get_disk_usage():
    return str(psutil.disk_usage('/').percent)
1 Like

This is a fairly industry standard way to do it. Look at SNMP, standard MIBs for diskspace on any Linux host. Basically if you install and run the SNMP daemon on RPI it will report it’s disk space automatically.

Then use this to fetch the correct OID for the disk you want.