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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Allow temperature proxy to authorize standalone nodes
rcourtman5411f809bf8a
diff --git a/internal/api/temperature_proxy.go b/internal/api/temperature_proxy.goindex 331578af0d..aff024438a 100644--- a/internal/api/temperature_proxy.go+++ b/internal/api/temperature_proxy.go@@ -113,11 +113,7 @@ func extractHostPart(raw string) string {return strings.TrimSpace(host)}-func buildAuthorizedNodeList(instance *config.PVEInstance) []authorizedNode {- if instance == nil {- return nil- }-+func buildAuthorizedNodeList(instances []config.PVEInstance) []authorizedNode {nodes := make([]authorizedNode, 0)seen := make(map[string]struct{})add := func(name, ip string) {@@ -134,21 +130,23 @@ func buildAuthorizedNodeList(instance *config.PVEInstance) []authorizedNode {nodes = append(nodes, authorizedNode{Name: name, IP: ip})}- // Base instance host/name- add(instance.Name, extractHostPart(instance.Host))- add(instance.Name, extractHostPart(instance.GuestURL))+ for i := range instances {+ instance := &instances[i]+ add(instance.Name, extractHostPart(instance.Host))+ add(instance.Name, extractHostPart(instance.GuestURL))- if instance.ClusterEndpoints != nil {- for _, ep := range instance.ClusterEndpoints {- name := ep.NodeName- ip := ep.IP- if ip == "" {- ip = extractHostPart(ep.Host)- }- if name == "" {- name = ep.Host+ if instance.ClusterEndpoints != nil {+ for _, ep := range instance.ClusterEndpoints {+ name := ep.NodeName+ ip := ep.IP+ if ip == "" {+ ip = extractHostPart(ep.Host)+ }+ if name == "" {+ name = ep.Host+ }+ add(name, ip)}- add(name, ip)}}@@ -292,7 +290,7 @@ func (h *TemperatureProxyHandlers) HandleRegister(w http.ResponseWriter, r *httpStr("pve_instance", matchedInstance.Name).Msg("Temperature proxy registered successfully")- allowed := buildAuthorizedNodeList(matchedInstance)+ allowed := buildAuthorizedNodeList(nodesConfig.PVEInstances)resp := map[string]any{"success": true,"token": authToken,@@ -371,9 +369,8 @@ func (h *TemperatureProxyHandlers) HandleAuthorizedNodes(w http.ResponseWriter,refreshInterval = refreshFromProxy}- nodes := buildAuthorizedNodeList(matched)- if len(nodes) == 0 {- // Always include at least the base instance name/host+ nodes := buildAuthorizedNodeList(nodesConfig.PVEInstances)+ if len(nodes) == 0 && matched != nil {nodes = append(nodes, authorizedNode{Name: matched.Name, IP: extractHostPart(matched.Host)})}