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
Flag pre-rc.6 SSH sensor setups and surface a re-run-setup notice
rcourtmand26f9da7097f
diff --git a/docs/release-control/v6/internal/subsystems/monitoring.md b/docs/release-control/v6/internal/subsystems/monitoring.mdindex 99814c6efc..7ef12008f9 100644--- a/docs/release-control/v6/internal/subsystems/monitoring.md+++ b/docs/release-control/v6/internal/subsystems/monitoring.md@@ -951,6 +951,12 @@ must request `/usr/local/sbin/pulse-sensors` when it exists, parse the wrapperpayload as `{sensors, smart}`, preserve backward compatibility with old forced`sensors -j` keys, and expose SMART disk temperatures through the same`models.Temperature.SMART` path used by the physical-disk merge.+When the payload arrives in the legacy raw `sensors -j` shape, the parser must+mark it via `models.Temperature.LegacySensorsFormat` and the host-agent merge+in `internal/monitoring/host_agent_temps.go` must preserve that marker, so the+frontend can surface a data-gated outdated-sensor-setup notice instead of+letting SATA/SAS disk temperatures silently stay blank on pre-rc.6 SSH key+setups.That same Proxmox monitoring boundary also owns checked response parsing forpolymorphic numeric fields. Shared client parsers such as`pkg/proxmox/replication.go` must use the package's checked integer conversiondiff --git a/frontend-modern/src/features/platformPage/PlatformOutdatedSensorSetupNotice.test.tsx b/frontend-modern/src/features/platformPage/PlatformOutdatedSensorSetupNotice.test.tsxnew file mode 100644index 0000000000..1fe4c929df--- /dev/null+++ b/frontend-modern/src/features/platformPage/PlatformOutdatedSensorSetupNotice.test.tsx@@ -0,0 +1,47 @@+import { cleanup, render, screen } from '@solidjs/testing-library';+import { afterEach, describe, expect, it } from 'vitest';+import { PlatformOutdatedSensorSetupNotice } from './PlatformOutdatedSensorSetupNotice';++afterEach(() => {+ cleanup();+});++describe('PlatformOutdatedSensorSetupNotice', () => {+ it('renders nothing when no nodes are affected', () => {+ render(() => <PlatformOutdatedSensorSetupNotice nodes={[]} />);+ expect(screen.queryByTestId('platform-outdated-sensor-setup-notice')).not.toBeInTheDocument();+ });++ it('explains a single affected node and how to fix it', () => {+ render(() => (+ <PlatformOutdatedSensorSetupNotice+ nodes={[{ id: 'node-1', name: 'pve1' }]}+ actionHref="/settings/infrastructure"+ />+ ));+ const notice = screen.getByTestId('platform-outdated-sensor-setup-notice');+ expect(notice).toHaveTextContent(+ 'pve1 is using an older temperature monitoring setup that cannot read SATA/SAS disk temperatures. Re-run the node setup script to upgrade it.',+ );+ expect(screen.getByRole('link', { name: 'Open Infrastructure settings' })).toHaveAttribute(+ 'href',+ '/settings/infrastructure',+ );+ });++ it('summarises multiple affected nodes and lists them', () => {+ render(() => (+ <PlatformOutdatedSensorSetupNotice+ nodes={[+ { id: 'node-1', name: 'pve1' },+ { id: 'node-2', name: 'pve2' },+ ]}+ />+ ));+ const notice = screen.getByTestId('platform-outdated-sensor-setup-notice');+ expect(notice).toHaveTextContent(+ '2 nodes are using an older temperature monitoring setup that cannot read SATA/SAS disk temperatures.',+ );+ expect(notice).toHaveTextContent('Affected: pve1, pve2.');+ });+});diff --git a/frontend-modern/src/features/platformPage/PlatformOutdatedSensorSetupNotice.tsx b/frontend-modern/src/features/platformPage/PlatformOutdatedSensorSetupNotice.tsxnew file mode 100644index 0000000000..b16a642828--- /dev/null+++ b/frontend-modern/src/features/platformPage/PlatformOutdatedSensorSetupNotice.tsx@@ -0,0 +1,57 @@+import { Show, createMemo } from 'solid-js';+import { AlertTriangle, ArrowRight } from 'lucide-solid';+import type { OutdatedSensorSetupNode } from './sensorSetup';++type PlatformOutdatedSensorSetupNoticeProps = {+ // Nodes whose SSH temperature setup predates the pulse-sensors wrapper.+ nodes: OutdatedSensorSetupNode[];+ actionHref?: string;+ actionLabel?: string;+};++// Inline notice shown on the Proxmox page when a node's SSH temperature+// monitoring was set up by a pre-v6.0.0-rc.6 setup script. That setup locks+// the SSH key to `sensors -j`, so SATA/SAS disk temperatures silently never+// appear (only NVMe shows, via kernel hwmon). Rendered only when an affected+// node actually has SATA/SAS disks without temperatures, so the page stays+// clean in the healthy case. Sibling of PlatformOutdatedAgentNotice.+export function PlatformOutdatedSensorSetupNotice(props: PlatformOutdatedSensorSetupNoticeProps) {+ const count = createMemo(() => props.nodes.length);+ const names = createMemo(() => props.nodes.map((node) => node.name).join(', '));+ const actionLabel = createMemo(() => props.actionLabel || 'Open Infrastructure settings');++ const message = createMemo(() => {+ if (count() === 1) {+ return `${props.nodes[0].name} is using an older temperature monitoring setup that cannot read SATA/SAS disk temperatures. Re-run the node setup script to upgrade it.`;+ }+ return `${count()} nodes are using an older temperature monitoring setup that cannot read SATA/SAS disk temperatures. Re-run the node setup script on each to upgrade them. Affected: ${names()}.`;+ });++ return (+ <Show when={count() > 0}>+ <div+ role="status"+ data-testid="platform-outdated-sensor-setup-notice"+ class="flex items-start gap-2 rounded-lg border border-amber-300 bg-amber-50 px-3 py-2 text-sm text-amber-800 dark:border-amber-800/60 dark:bg-amber-900/20 dark:text-amber-200"+ >+ <AlertTriangle class="mt-0.5 h-4 w-4 shrink-0" aria-hidden="true" />+ <div class="min-w-0 flex-1 space-y-1">+ <div>{message()}</div>+ <Show when={props.actionHref}>+ {(href) => (+ <a+ href={href()}+ class="inline-flex items-center gap-1 text-xs font-semibold text-amber-900 underline-offset-2 hover:underline dark:text-amber-100"+ >+ <span>{actionLabel()}</span>+ <ArrowRight class="h-3.5 w-3.5" aria-hidden="true" />+ </a>+ )}+ </Show>+ </div>+ </div>+ </Show>+ );+}++export default PlatformOutdatedSensorSetupNotice;diff --git a/frontend-modern/src/features/platformPage/sensorSetup.test.ts b/frontend-modern/src/features/platformPage/sensorSetup.test.tsnew file mode 100644index 0000000000..4b205c68e1--- /dev/null+++ b/frontend-modern/src/features/platformPage/sensorSetup.test.ts@@ -0,0 +1,126 @@+import { describe, expect, it } from 'vitest';+import type { Resource } from '@/types/resource';+import { collectOutdatedSensorSetupNodes } from './sensorSetup';++const node = (over: Partial<Resource> & { proxmox?: Resource['proxmox'] }): Resource =>+ ({ id: 'node-1', name: 'pve1', type: 'node', ...over }) as Resource;++const disk = (over: {+ id?: string;+ parentId?: string;+ nodeName?: string;+ diskType?: string;+ temperature?: number;+}): Resource =>+ ({+ id: over.id ?? 'disk-1',+ name: 'disk',+ type: 'physical_disk',+ parentId: over.parentId,+ physicalDisk: {+ diskType: over.diskType ?? 'sata',+ temperature: over.temperature ?? 0,+ },+ platformData: over.nodeName ? { proxmox: { nodeName: over.nodeName } } : {},+ }) as unknown as Resource;++const legacyNode = (over: Partial<Resource> = {}): Resource =>+ node({+ proxmox: {+ node: 'pve1',+ temperatureDetails: { available: true, legacySensorsFormat: true },+ },+ ...over,+ });++describe('collectOutdatedSensorSetupNodes', () => {+ it('flags a legacy-format node with a SATA disk missing a temperature', () => {+ const result = collectOutdatedSensorSetupNodes(+ [legacyNode()],+ [disk({ nodeName: 'pve1', diskType: 'sata' })],+ );+ expect(result).toEqual([{ id: 'node-1', name: 'pve1' }]);+ });++ it('matches disks to nodes by parentId as well as node name', () => {+ const result = collectOutdatedSensorSetupNodes(+ [legacyNode()],+ [disk({ parentId: 'node-1', diskType: 'sas' })],+ );+ expect(result).toEqual([{ id: 'node-1', name: 'pve1' }]);+ });++ it('ignores nodes whose payload is the wrapper format', () => {+ const wrapperNode = node({+ proxmox: { node: 'pve1', temperatureDetails: { available: true } },+ });+ expect(+ collectOutdatedSensorSetupNodes([wrapperNode], [disk({ nodeName: 'pve1' })]),+ ).toEqual([]);+ });++ it('ignores legacy nodes when temperature collection did not succeed', () => {+ const unavailableNode = node({+ proxmox: {+ node: 'pve1',+ temperatureDetails: { available: false, legacySensorsFormat: true },+ },+ });+ expect(+ collectOutdatedSensorSetupNodes([unavailableNode], [disk({ nodeName: 'pve1' })]),+ ).toEqual([]);+ });++ it('ignores legacy nodes whose SATA/SAS disks already have temperatures', () => {+ expect(+ collectOutdatedSensorSetupNodes(+ [legacyNode()],+ [disk({ nodeName: 'pve1', diskType: 'sata', temperature: 34 })],+ ),+ ).toEqual([]);+ });++ it('ignores legacy nodes with only NVMe disks missing temperatures', () => {+ expect(+ collectOutdatedSensorSetupNodes(+ [legacyNode()],+ [disk({ nodeName: 'pve1', diskType: 'nvme' })],+ ),+ ).toEqual([]);+ });++ it('ignores disks that belong to a different node', () => {+ expect(+ collectOutdatedSensorSetupNodes([legacyNode()], [disk({ nodeName: 'pve2' })]),+ ).toEqual([]);+ });++ it('sorts multiple affected nodes by name', () => {+ const nodes = [+ node({+ id: 'node-b',+ name: 'pve-b',+ proxmox: {+ node: 'pve-b',+ temperatureDetails: { available: true, legacySensorsFormat: true },+ },+ }),+ node({+ id: 'node-a',+ name: 'pve-a',+ proxmox: {+ node: 'pve-a',+ temperatureDetails: { available: true, legacySensorsFormat: true },+ },+ }),+ ];+ const disks = [+ disk({ id: 'disk-a', nodeName: 'pve-a' }),+ disk({ id: 'disk-b', nodeName: 'pve-b' }),+ ];+ expect(collectOutdatedSensorSetupNodes(nodes, disks).map((n) => n.name)).toEqual([+ 'pve-a',+ 'pve-b',+ ]);+ });+});diff --git a/frontend-modern/src/features/platformPage/sensorSetup.ts b/frontend-modern/src/features/platformPage/sensorSetup.tsnew file mode 100644index 0000000000..04c1378370--- /dev/null+++ b/frontend-modern/src/features/platformPage/sensorSetup.ts@@ -0,0 +1,54 @@+import type { Resource } from '@/types/resource';+import { matchesPhysicalDiskNode } from '@/components/Storage/diskResourceUtils';++// Disk transports whose temperatures only arrive via SMART (the pulse-sensors+// wrapper). NVMe temps come from kernel hwmon and work even on legacy setups.+const SMART_ONLY_DISK_TYPES = new Set(['sata', 'sas']);++export type OutdatedSensorSetupNode = {+ id: string;+ name: string;+};++const getNodeName = (node: Resource): string =>+ (node.proxmox?.node || node.proxmox?.nodeName || node.name || '').trim();++const isSMARTOnlyDiskWithoutTemperature = (disk: Resource): boolean => {+ const meta = disk.physicalDisk;+ if (!meta) return false;+ const diskType = (meta.diskType || '').trim().toLowerCase();+ if (!SMART_ONLY_DISK_TYPES.has(diskType)) return false;+ return (meta.temperature ?? 0) <= 0;+};++// Flags PVE nodes whose SSH temperature monitoring still runs the pre-rc.6+// setup (authorized_keys locked to `sensors -j`). Such a payload parses fine+// and delivers CPU/NVMe temps, but SMART (SATA/SAS) disk temperatures can+// never arrive, so they silently stay blank. Data-gated three ways: the last+// collection succeeded, the payload was legacy-format, and the node actually+// has SATA/SAS disks sitting without a temperature. Nodes whose disk temps+// arrive elsewhere (e.g. a linked host agent) fall out via the last check.+export function collectOutdatedSensorSetupNodes(+ nodes: Resource[],+ physicalDisks: Resource[],+): OutdatedSensorSetupNode[] {+ if (!nodes.length || !physicalDisks.length) return [];++ return nodes+ .filter((node) => {+ const details = node.proxmox?.temperatureDetails;+ if (!details?.available || !details.legacySensorsFormat) return false;+ const nodeName = getNodeName(node);+ return physicalDisks.some(+ (disk) =>+ isSMARTOnlyDiskWithoutTemperature(disk) &&+ matchesPhysicalDiskNode(disk, {+ id: node.id,+ name: nodeName,+ instance: node.proxmox?.instance,+ }),+ );+ })+ .map((node) => ({ id: node.id, name: getNodeName(node) }))+ .sort((a, b) => a.name.localeCompare(b.name));+}diff --git a/frontend-modern/src/features/proxmox/ProxmoxPageSurface.tsx b/frontend-modern/src/features/proxmox/ProxmoxPageSurface.tsxindex b74e461b8c..e32ae4755b 100644--- a/frontend-modern/src/features/proxmox/ProxmoxPageSurface.tsx+++ b/frontend-modern/src/features/proxmox/ProxmoxPageSurface.tsx@@ -14,13 +14,18 @@ import {isWorkloadTableMetricHistoryRange,type WorkloadTableMetricHistoryRange,} from '@/components/Workloads/workloadMetricHistoryModel';-import { buildInfrastructureAgentUpdatesPath } from '@/components/Settings/infrastructureWorkspaceModel';+import {+ buildInfrastructureAgentUpdatesPath,+ buildInfrastructureWorkspacePath,+} from '@/components/Settings/infrastructureWorkspaceModel';import {collectOutdatedAgentHosts,formatAgentVersionDisplay,} from '@/features/platformPage/agentVersion';import { getPlatformIcon } from '@/features/platformPage/platformIcon';import { PlatformOutdatedAgentNotice } from '@/features/platformPage/PlatformOutdatedAgentNotice';+import { PlatformOutdatedSensorSetupNotice } from '@/features/platformPage/PlatformOutdatedSensorSetupNotice';+import { collectOutdatedSensorSetupNodes } from '@/features/platformPage/sensorSetup';import { usePersistentSignal } from '@/hooks/usePersistentSignal';import { STORAGE_KEYS } from '@/utils/localStorage';import {@@ -97,6 +102,12 @@ export function ProxmoxPageSurface() {const serverVersionDisplay = createMemo(() =>formatAgentVersionDisplay(agentUpdateTargetVersion()),);+ const outdatedSensorSetupNodes = createMemo(() =>+ collectOutdatedSensorSetupNodes(+ model().pveNodes,+ model().resources.filter((resource) => resource.type === 'physical_disk'),+ ),+ );// The hosts table at the top and the embedded WorkloadsSurface below share// the bars/sparklines toggle (and the sparkline history range that ships@@ -163,6 +174,10 @@ export function ProxmoxPageSurface() {actionHref={outdatedAgentUpdatePath()}actionLabel="Open agent upgrade commands"/>+ <PlatformOutdatedSensorSetupNotice+ nodes={outdatedSensorSetupNodes()}+ actionHref={buildInfrastructureWorkspacePath()}+ /><Show when={activeTab() === 'overview'}><ProxmoxOverviewmodel={model}diff --git a/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts b/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.tsindex 08ea5a7e55..e3550bf5dc 100644--- a/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts+++ b/frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts@@ -868,6 +868,41 @@ describe('useUnifiedResources', () => {dispose();});+ it('passes proxmox temperatureDetails through for the outdated-sensor-setup gate', async () => {+ apiFetchMock.mockResolvedValueOnce({+ ok: true,+ json: async () => ({+ data: [+ {+ ...v2Resource,+ sources: ['proxmox'],+ agent: undefined,+ proxmox: {+ nodeName: 'pve1',+ temperature: 58.4,+ temperatureDetails: { available: true, legacySensorsFormat: true },+ },+ },+ ],+ }),+ });++ let dispose = () => {};+ let result: ReturnType<UseUnifiedResourcesModule['useUnifiedResources']> | undefined;+ createRoot((d) => {+ dispose = d;+ result = useUnifiedResources({ query: 'type=k8s-deployment', cacheKey: 'k8s-deployments' });+ });++ await result!.refetch();+ expect(result!.resources()[0].proxmox?.temperatureDetails).toEqual({+ available: true,+ legacySensorsFormat: true,+ });++ dispose();+ });+it('projects raw VMware sources onto the canonical vSphere platform model', async () => {apiFetchMock.mockResolvedValueOnce({ok: true,diff --git a/frontend-modern/src/hooks/useUnifiedResources.ts b/frontend-modern/src/hooks/useUnifiedResources.tsindex 942adadd05..591bc78155 100644--- a/frontend-modern/src/hooks/useUnifiedResources.ts+++ b/frontend-modern/src/hooks/useUnifiedResources.ts@@ -202,6 +202,10 @@ type APIResource = {cpus?: number;uptime?: number;temperature?: number;+ temperatureDetails?: {+ available?: boolean;+ legacySensorsFormat?: boolean;+ };template?: boolean;disks?: APIAgentDiskInfo[];swapUsed?: number;@@ -821,6 +825,7 @@ const toResource = (v2: APIResource): Resource => {swapUsed: v2.proxmox.swapUsed,swapTotal: v2.proxmox.swapTotal,balloon: v2.proxmox.balloon,+ temperatureDetails: v2.proxmox.temperatureDetails,}: undefined,cpu: metricToResourceMetric(v2.metrics?.cpu),diff --git a/frontend-modern/src/types/api.ts b/frontend-modern/src/types/api.tsindex effc42d19b..f9e273d5e9 100644--- a/frontend-modern/src/types/api.ts+++ b/frontend-modern/src/types/api.ts@@ -1068,6 +1068,7 @@ export interface Temperature {hasCPU?: boolean; // Whether CPU temperature data is availablehasGPU?: boolean; // Whether GPU temperature data is availablehasNVMe?: boolean; // Whether NVMe temperature data is available+ legacySensorsFormat?: boolean; // SSH payload was raw `sensors -j` (pre-rc.6 node setup); SMART disk temps cannot arrive until the setup script is re-runlastUpdate: string; // When this data was collected}diff --git a/frontend-modern/src/types/resource.ts b/frontend-modern/src/types/resource.tsindex 43142d55c3..6afac23453 100644--- a/frontend-modern/src/types/resource.ts+++ b/frontend-modern/src/types/resource.ts@@ -612,6 +612,13 @@ export interface ResourceProxmoxMeta {osTemplate?: string;pveVersion?: string;kernelVersion?: string;+ // Narrow projection of the node's temperature payload. `legacySensorsFormat`+ // marks SSH sensor setups from before v6.0.0-rc.6 (authorized_keys locked to+ // `sensors -j`), which can never deliver SATA/SAS disk temperatures.+ temperatureDetails?: {+ available?: boolean;+ legacySensorsFormat?: boolean;+ };}// Docker runtime, container, and Swarm service projection emitted by thediff --git a/internal/models/models.go b/internal/models/models.goindex d656e52b01..d68c5a423a 100644--- a/internal/models/models.go+++ b/internal/models/models.go@@ -2709,7 +2709,12 @@ type Temperature struct {HasGPU bool `json:"hasGPU"` // Whether GPU temperature data is availableHasNVMe bool `json:"hasNVMe"` // Whether NVMe temperature data is availableHasSMART bool `json:"hasSMART"` // Whether SMART disk temperature data is available- LastUpdate time.Time `json:"lastUpdate"` // When this data was collected+ // True when the SSH payload was raw `sensors -j` output instead of the+ // pulse-sensors wrapper payload. Pre-v6.0.0-rc.6 setup scripts lock the+ // authorized_keys entry to `sensors -j`, so SMART (SATA/SAS) disk temps+ // can never arrive until the node setup script is re-run.+ LegacySensorsFormat bool `json:"legacySensorsFormat,omitempty"`+ LastUpdate time.Time `json:"lastUpdate"` // When this data was collected}func (t Temperature) NormalizeCollections() Temperature {diff --git a/internal/monitoring/host_agent_temps.go b/internal/monitoring/host_agent_temps.goindex 241d08f80a..7b9ef26bf8 100644--- a/internal/monitoring/host_agent_temps.go+++ b/internal/monitoring/host_agent_temps.go@@ -373,7 +373,11 @@ func mergeTemperatureData(hostAgentTemp, proxyTemp *models.Temperature) *models.HasGPU: hostAgentTemp.HasGPU,HasNVMe: hostAgentTemp.HasNVMe,HasSMART: hostAgentTemp.HasSMART || proxyTemp.HasSMART,- LastUpdate: hostAgentTemp.LastUpdate,+ // The legacy-format marker describes the node's SSH sensor setup; a+ // linked host agent doesn't fix that setup, so the flag survives the+ // merge (the UI gate hides the notice once disk temps actually arrive).+ LegacySensorsFormat: proxyTemp.LegacySensorsFormat,+ LastUpdate: hostAgentTemp.LastUpdate,}// Use host agent CPU data if available, fall back to proxydiff --git a/internal/monitoring/host_agent_temps_test.go b/internal/monitoring/host_agent_temps_test.goindex 2bcfcb1c40..c0569c1df8 100644--- a/internal/monitoring/host_agent_temps_test.go+++ b/internal/monitoring/host_agent_temps_test.go@@ -283,6 +283,29 @@ func TestMergeTemperatureData_NilInputs(t *testing.T) {})}+func TestMergeTemperatureData_PreservesLegacySensorsFormat(t *testing.T) {+ hostTemp := &models.Temperature{+ CPUPackage: 55.0,+ HasCPU: true,+ Available: true,+ LastUpdate: time.Now(),+ }+ proxyTemp := &models.Temperature{+ CPUPackage: 52.0,+ HasCPU: true,+ Available: true,+ LegacySensorsFormat: true,+ }++ result := mergeTemperatureData(hostTemp, proxyTemp)+ if result == nil {+ t.Fatal("expected non-nil result")+ }+ if !result.LegacySensorsFormat {+ t.Error("expected LegacySensorsFormat from proxy to survive the merge")+ }+}+func TestMergeTemperatureData_Merge(t *testing.T) {hostTemp := &models.Temperature{CPUPackage: 55.0,diff --git a/internal/monitoring/temperature.go b/internal/monitoring/temperature.goindex 6ab8efd8b5..624600674f 100644--- a/internal/monitoring/temperature.go+++ b/internal/monitoring/temperature.go@@ -461,9 +461,10 @@ func (tc *TemperatureCollector) parseSensorsJSON(jsonStr string) (*models.Temper}temp := &models.Temperature{- Cores: []models.CoreTemp{},- NVMe: []models.NVMeTemp{},- SMART: smartData,+ Cores: []models.CoreTemp{},+ NVMe: []models.NVMeTemp{},+ SMART: smartData,+ LegacySensorsFormat: !parsedWrapper,}foundCPUChip := falsediff --git a/internal/monitoring/temperature_test.go b/internal/monitoring/temperature_test.goindex bb2234227b..55d4efeeff 100644--- a/internal/monitoring/temperature_test.go+++ b/internal/monitoring/temperature_test.go@@ -201,6 +201,27 @@ func TestTemperatureCollector_ParseSensorsJSON_WrapperSMARTTemps(t *testing.T) {assert.Equal(t, "SATA-SERIAL-1", temp.SMART[0].Serial)assert.Equal(t, 34, temp.SMART[0].Temperature)assert.Equal(t, "sata", temp.SMART[0].Type)+ assert.False(t, temp.LegacySensorsFormat)+}++func TestTemperatureCollector_ParseSensorsJSON_FlagsLegacyFormat(t *testing.T) {+ tc := &TemperatureCollector{}++ // Raw `sensors -j` output, the shape forced by pre-rc.6 authorized_keys+ // entries. Disk (SMART) temperatures can never arrive on this path, so the+ // payload must be flagged for the outdated-sensor-setup notice.+ jsonStr := `{+ "coretemp-isa-0000": {+ "Package id 0": { "temp1_input": 47.0 }+ }+ }`++ temp, err := tc.parseSensorsJSON(jsonStr)+ require.NoError(t, err)+ require.NotNil(t, temp)+ assert.True(t, temp.Available)+ assert.True(t, temp.LegacySensorsFormat)+ assert.False(t, temp.HasSMART)}func TestTemperatureCollector_HelperMethods(t *testing.T) {