Feature Request: Add monitoring of USB HDD to RPi Monitor. Topic is solved

Suggestions for features and software you would like to see in DietPi, goes here.
rmarijnissen
Posts: 1
Joined: Fri Nov 13, 2020 3:47 pm

Re: Feature Request: Add monitoring of USB HDD to RPi Monitor.

Post by rmarijnissen »

Hello All,

Today i tried to add the usbhdd.conf.
I works but i keep getting NANKB for used, free and total

Below the conf file.

Code: Select all

static.40.name=sda1_total
static.40.source=df -t ext4
static.40.regexp=sda1\s+(\d+)
static.40.postprocess=$1/1024

dynamic.44.name=sda1_used
dynamic.44.source=df -t ext4
dynamic.44.regexp=sda1\s+\d+\s+(\d+)
dynamic.44.postprocess=$1/1024
dynamic.44.rrd=GAUGE

web.status.1.content.9.name=USB HDD
web.status.1.content.9.icon=usb_hdd.png
web.status.1.content.9.line.1="<b>/sda1</b> Used: <b>"+KMG(data.sda1_used,'M')+"</b> (<b>"+Percent(data.s$
web.status.1.content.9.line.2=ProgressBar(data.sda1_used,data.sda1_total)

web.statistics.1.content.9.name=USB HDD
web.statistics.1.content.9.graph.1=sda1_total
web.statistics.1.content.9.graph.2=sda1_used
web.statistics.1.content.9.ds_graph_options.sda1_total.label=USB HDD total space (MB)
web.statistics.1.content.9.ds_graph_options.sda1_total.color="#FF7777"
web.statistics.1.content.9.ds_graph_options.sda1_used.label=USB HDD used space (MB)
web.statistics.1.content.9.ds_graph_options.sda1_used.lines={ fill: true }
web.statistics.1.content.9.ds_graph_options.sda1_used.color="#7777FF"
Any help would be welcome!
p.s. i run rpimonitor in docker
User avatar
Joulinar
Posts: 2572
Joined: Sat Nov 16, 2019 12:49 am

Re: Feature Request: Add monitoring of USB HDD to RPi Monitor.

Post by Joulinar »

Hi,

I was playing with it as well. Indeed the divice is not shown correctly at the beginning
picture.PNG

but it solved as soon as I accessed the drive.
picture1.PNG

Looks like RPi-Monitor can show mounted device only. And by default DietPi is mounting USB devices if they are accessed first time. They are not mounted on boot automatically.

AHH and on Docker you might need to map the device to have it available inside the container. https://github.com/michaelmiklis/docker-rpi-monitor
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply