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.

Add PULSE_LXC_CTID env override for LXC CTID detection

rcourtman5f5500b2bfdb
diff --git a/internal/api/router.go b/internal/api/router.go
index db07f3c789..8fdcbfebd0 100644
--- a/internal/api/router.go
+++ b/internal/api/router.go
@@ -487,8 +487,11 @@ func (r *Router) setupRoutes() {
status["bootstrapTokenPath"] = r.bootstrapTokenPath
status["isDocker"] = os.Getenv("PULSE_DOCKER") == "true"
status["inContainer"] = system.InContainer()
+ // Try auto-detection first, then fall back to env override
if ctid := system.DetectLXCCTID(); ctid != "" {
status["lxcCtid"] = ctid
+ } else if envCtid := os.Getenv("PULSE_LXC_CTID"); envCtid != "" {
+ status["lxcCtid"] = envCtid
}
if containerName := system.DetectDockerContainerName(); containerName != "" {
status["dockerContainerName"] = containerName