Skip to content

Commit aac97b5

Browse files
committed
feat: add extra_filesystems config option
1 parent 57d2e26 commit aac97b5

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ config agent 'agent'
7575
# (see https://beszel.dev/guide/security for details)
7676
option hub_url 'https://YOUR_BESZEL_HUB_URL_HERE'
7777
option token 'YOUR_AGENT_TOKEN_HERE'
78+
79+
# optional, monitor extra disks (comma-separated, `device__label`)
80+
option extra_filesystems 'sda1__NAS'
7881
```
7982

8083
Get your authentication key (and agent token, if necessary) from the Beszel hub when adding a new system.

beszel-agent/files/beszel-agent.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ config agent 'agent'
44
option public_key ''
55
option hub_url '' # optional, for outbound mode (websockets)
66
option token '' # optional, for outbound mode (websockets)
7+
option extra_filesystems '' # optional, comma-separated, e.g. 'sda1__NAS'
78

beszel-agent/files/beszel-agent.init

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ USE_PROCD=1
77
PROG=/usr/bin/beszel-agent
88

99
start_service() {
10-
local enabled port key url token
10+
local enabled port key url token extra_fs
1111

1212
config_load 'beszel-agent'
1313
config_get_bool enabled 'agent' 'enabled' '0'
1414
config_get port 'agent' 'port' '45876'
1515
config_get key 'agent' 'public_key' ''
1616
config_get url 'agent' 'hub_url' ''
1717
config_get token 'agent' 'token' ''
18+
config_get extra_fs 'agent' 'extra_filesystems' ''
1819

1920
[ "$enabled" -eq 0 ] && return 0
2021

@@ -39,6 +40,7 @@ start_service() {
3940
}
4041

4142
procd_set_param env DATA_DIR=/usr/share/beszel-agent
43+
[ -n "$extra_fs" ] && procd_append_param env EXTRA_FILESYSTEMS="$extra_fs"
4244
procd_set_param respawn 3600 5 5
4345
procd_set_param stdout 1
4446
procd_set_param stderr 1

0 commit comments

Comments
 (0)