Skip to content

Commit deb318a

Browse files
committed
Added Netdata integration
1 parent b9b676c commit deb318a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

home/.chezmoiscripts/universal/run_onchange_after_57-netdata.sh.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ if command -v netdata-claim.sh > /dev/null; then
7474
logg info "Copying ${XDG_CONFIG_HOME:-$HOME/.config}/netdata/health.d/ to $NETDATA_ETC"
7575
sudo cp -rf "${XDG_CONFIG_HOME:-$HOME/.config}/netdata/health.d/" "$NETDATA_ETC"
7676

77+
logg info "Adding SFTPGo metrics collection to $NETDATA_ETC/go.d/prometheus.conf"
78+
sudo sed -i.bak "/jobs:/a\ - name: sftpgo_local \n url: 'http://127.0.0.1:57500/metrics'" "$NETDATA_ETC/go.d/prometheus.conf"
79+
7780
# Backup current health alarm configuration and apply new one
7881
if [ -d /usr/local/lib/netdata ]; then
7982
NETDATA_LIB='/usr/local/lib/netdata'

home/dot_local/etc/sftpgo/sftpgo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@
361361
"hide_support_link": true
362362
},
363363
"telemetry": {
364-
"bind_port": 0,
364+
"bind_port": 57500,
365365
"bind_address": "127.0.0.1",
366366
"enable_profiler": false,
367367
"auth_user_file": "",

0 commit comments

Comments
 (0)