Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix: detect containerized Pulse with healthy status

rcourtman2045bcfdd6af
diff --git a/internal/api/config_handlers.go b/internal/api/config_handlers.go
index 9fe1ad3ad2..533e21563b 100644
--- a/internal/api/config_handlers.go
+++ b/internal/api/config_handlers.go
@@ -3677,7 +3677,9 @@ if command -v pct >/dev/null 2>&1; then
# Check all containers for matching IP
for CTID in $(pct list | awk 'NR>1 {print $1}'); do
# Verify container is running before attempting connection
- if ! pct status "$CTID" 2>/dev/null | grep -q "running"; then
+ # Note: status can be "running", "running (healthy)", or "running (unhealthy)"
+ CT_STATUS=$(pct status "$CTID" 2>/dev/null || echo "")
+ if ! echo "$CT_STATUS" | grep -q "running"; then
continue
fi