Add clean deployment scripts for monitoring services

- setup-glances.sh: Install Glances with web interface and systemd service
- setup-netdata.sh: Install Netdata without nginx configuration changes
- deploy-netdata-config.sh: Complete Netdata deployment with privacy config
- Remove redundant iterative scripts from troubleshooting process
- Each script handles one specific deployment task cleanly
This commit is contained in:
2025-09-09 21:14:14 +02:00
parent c5849679f9
commit 2fa9ec3a20
3 changed files with 111 additions and 0 deletions

32
scripts/setup-netdata.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/bash
# Install and configure Netdata monitoring service
# Run with: sudo -A ./scripts/setup-netdata.sh
set -e
echo "=== Installing Netdata monitoring service ==="
pacman -S --noconfirm netdata
echo "=== Enabling and starting Netdata service ==="
systemctl enable netdata
systemctl start netdata
echo "=== Checking Netdata service status ==="
systemctl status netdata --no-pager -l
echo "=== Stopping and disabling Cockpit services ==="
systemctl stop cockpit cockpit.socket 2>/dev/null || echo "Cockpit services not running"
systemctl disable cockpit cockpit.socket 2>/dev/null || echo "Cockpit services not enabled"
echo "=== Deploying updated landing page ==="
cp /home/hoborg/homelab/config/www/index.html /var/www/homelab/
echo "✅ Landing page updated with Netdata link"
echo ""
echo "=== Netdata installation complete! ==="
echo "Local access: http://127.0.0.1:19999/"
echo "External access: https://ak-homelab.duckdns.org/netdata/ (after nginx config deploy)"
echo ""
echo "To deploy nginx config separately:"
echo "sudo cp /home/hoborg/homelab/config/nginx/homelab.conf /etc/nginx/sites-available/homelab"
echo "sudo nginx -t && sudo systemctl reload nginx"