Page 2 of 2

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

Posted: Wed Feb 12, 2020 4:54 am
by WarHawk
To have an option like this being worked on

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

Posted: Wed Feb 12, 2020 6:39 pm
by Frieseba
Okay, I get it. Unfortunately the topic and therefore the problem is a bit older. Still looking for a solution

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

Posted: Thu Feb 13, 2020 9:46 am
by tjamaa
Did you restart rpimonitor? This worked for me:
systemctl restart rpimonitor
In any case, you should not get the error message regarding /storage1 with the settings of the OP, unless storage.conf is enabled in data.conf

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

Posted: Fri Feb 14, 2020 6:51 pm
by Frieseba
I did the restart like you told and checked the data.conf. As you cann see, I enabled the usb_hdd
1.JPG
2.JPG

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

Posted: Fri Feb 14, 2020 10:04 pm
by tjamaa
You probably have to disable the storage.conf line in data.conf, it will interfere with the settings in usb_hdd.conf.

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

Posted: Fri Feb 14, 2020 11:04 pm
by Frieseba
By disabling that line the hdd-icon isn`t shown on the RPI Monitor-screen

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

Posted: Sat Feb 15, 2020 12:50 pm
by tjamaa
My version of usb_hdd.conf:

Code: Select all

########################################################################
# Extract USB HDD (sda1, sdb1, md0)
########################################################################
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

static.20.name=sdb1_total
static.20.source=df -t ext4
static.20.regexp=sdb1\s+(\d+)
static.20.postprocess=$1/1024

dynamic.24.name=sdb1_used
dynamic.24.source=df -t ext4
dynamic.24.regexp=sdb1\s+\d+\s+(\d+)
dynamic.24.postprocess=$1/1024
dynamic.24.rrd=GAUGE

static.30.name=md0_total
static.30.source=df -t ext4
static.30.regexp=md0\s+(\d+)
static.30.postprocess=$1/1024

dynamic.34.name=md0_used
dynamic.34.source=df -t ext4
dynamic.34.regexp=md0\s+\d+\s+(\d+)
dynamic.34.postprocess=$1/1024
dynamic.34.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.sda1_used,data.sda1_total)+"</b>) Free: <b>"+KMG(data.sda1_total-data.sda1_used,'M')+"</b> Total: <b>"+KMG(data.sda1_total,'M')+"</b>"
web.status.1.content.9.line.2=ProgressBar(data.sda1_used,data.sda1_total)
web.status.1.content.9.line.3="<b>/sdb1</b> Used: <b>"+KMG(data.sdb1_used,'M')+"</b> (<b>"+Percent(data.sdb1_used,data.sdb1_total)+"</b>) Free: <b>"+KMG(data.sdb1_total-data.sdb1_used,'M')+"</b> Total: <b>"+KMG(data.sdb1_total,'M')+"</b>"
web.status.1.content.9.line.4=ProgressBar(data.sdb1_used,data.sdb1_total)
web.status.1.content.9.line.5="<b>/md0</b> Used: <b>"+KMG(data.md0_used,'M')+"</b> (<b>"+Percent(data.md0_used,data.md0_total)+"</b>) Free: <b>"+KMG(data.md0_total-data.md0_used,'M')+"</b> Total: <b>"+KMG(data.md0_total,'M')+"</b>"
web.status.1.content.9.line.6=ProgressBar(data.md0_used,data.md0_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"
Part of my data.conf:

Code: Select all

...
include=/etc/rpimonitor/template/swap.conf
include=/etc/rpimonitor/template/sdcard.conf
include=/etc/rpimonitor/template/usb_hdd.conf
include=/etc/rpimonitor/template/network.conf

#include=/etc/rpimonitor/template/printer.conf
#include=/etc/rpimonitor/template/storage.conf
#include=/etc/rpimonitor/template/services.conf
#include=/etc/rpimonitor/template/wlan.conf
#include=/etc/rpimonitor/template/dht11.conf
#include=/etc/rpimonitor/template/entropy.conf
Output (on a RPI4): see attachment

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

Posted: Sun Feb 16, 2020 1:01 pm
by Frieseba
Thank you. I took yours and its still not working. Even after restart it doesn't work.

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

Posted: Sun Feb 16, 2020 2:11 pm
by tjamaa
You may want to double-check if the regexp statements return the correct parameter using e.g. https://regex101.com/, pasting the output of the "df -t ext4" command as the test string. That's all I can think of.

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

Posted: Mon Feb 17, 2020 7:33 pm
by Frieseba
Thanks for your patience and help. I reinstalled everything again and now it runs