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.
User avatar
WarHawk
Posts: 606
Joined: Thu Jul 20, 2017 8:55 am

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

Post by WarHawk »

To have an option like this being worked on
Frieseba
Posts: 7
Joined: Mon Feb 10, 2020 8:36 pm

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

Post by Frieseba »

Okay, I get it. Unfortunately the topic and therefore the problem is a bit older. Still looking for a solution
tjamaa
Posts: 8
Joined: Sat Sep 14, 2019 10:17 pm

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

Post 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
Frieseba
Posts: 7
Joined: Mon Feb 10, 2020 8:36 pm

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

Post 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
tjamaa
Posts: 8
Joined: Sat Sep 14, 2019 10:17 pm

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

Post by tjamaa »

You probably have to disable the storage.conf line in data.conf, it will interfere with the settings in usb_hdd.conf.
Frieseba
Posts: 7
Joined: Mon Feb 10, 2020 8:36 pm

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

Post by Frieseba »

By disabling that line the hdd-icon isn`t shown on the RPI Monitor-screen
tjamaa
Posts: 8
Joined: Sat Sep 14, 2019 10:17 pm

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

Post 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
Attachments
Capture.JPG
Frieseba
Posts: 7
Joined: Mon Feb 10, 2020 8:36 pm

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

Post by Frieseba »

Thank you. I took yours and its still not working. Even after restart it doesn't work.
tjamaa
Posts: 8
Joined: Sat Sep 14, 2019 10:17 pm

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

Post 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.
Frieseba
Posts: 7
Joined: Mon Feb 10, 2020 8:36 pm

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

Post by Frieseba »

Thanks for your patience and help. I reinstalled everything again and now it runs
Post Reply