feat(logs): journald-Input — PVE/Nicht-Docker-Nodes lieferten bisher gar keine Logs
This commit is contained in:
1 parent
eea9f7fce4
commit
e1da311488
3 files changed
+45
-2
No files matched your search
+12
@@ -268,6 +268,18 @@ EOF
|
||||
esac
|
||||
[ "$HAS_APACHE" -eq 1 ] && [ "$ROLE" != "apache" ] && { fetch_conf telegraf/apache.conf /etc/telegraf/telegraf.d/apache.conf; usermod -aG adm telegraf 2>/dev/null || true; }
|
||||
|
||||
# --- System-Logs (journald) → Loki — nur auf systemd-Systemen ---
|
||||
if command -v journalctl >/dev/null 2>&1 && [ -d /run/systemd/system ]; then
|
||||
fetch_conf telegraf/journal.conf /etc/telegraf/telegraf.d/journal.conf
|
||||
log "journald-Logs aktiv (Warnungen+ ab jetzt; PVE-Units inklusive)."
|
||||
# Journal-Zugriff fuer den Dienst-Benutzer
|
||||
if [ "$ROLE" = "proxmox" ]; then
|
||||
: # laeuft als root (Drop-in) — voller Zugriff
|
||||
else
|
||||
usermod -aG systemd-journal telegraf 2>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
|
||||
# --- Node-Info (LAN-IP, NetBird-IP/FQDN, PVE-URL) — auf jeder Node ---
|
||||
fetch scripts/node-info.sh /etc/telegraf/node-info.sh
|
||||
chmod 0755 /etc/telegraf/node-info.sh
|
||||
|
||||
Reference in new issue
Block a user