{"record":{"id":"fe906adce5e0feb6","repo":"henrygd/beszel","slug":"no-smart-data-in-response","errorCode":null,"errorMessage":"no SMART data in response","messagePattern":"no SMART data in response","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"internal/hub/transport/transport.go","lineNumber":94,"sourceCode":"\t\t\treturn errors.New(\"no logs in response\")\n\t\t}\n\t\t*d = *resp.String\n\t\treturn nil\n\tcase common.GetContainerInfo:\n\t\td, ok := dest.(*string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"unexpected dest type for GetContainerInfo: %T\", dest)\n\t\t}\n\t\tif resp.String == nil {\n\t\t\treturn errors.New(\"no info in response\")\n\t\t}\n\t\t*d = *resp.String\n\t\treturn nil\n\tcase common.GetSmartData:\n\t\tswitch d := dest.(type) {\n\t\tcase *map[string]smart.SmartData:\n\t\t\tif resp.SmartData == nil {\n\t\t\t\treturn errors.New(\"no SMART data in response\")\n\t\t\t}\n\t\t\t*d = resp.SmartData\n\t\t\treturn nil\n\t\tcase *smart.SmartDataResponse:\n\t\t\tif resp.SmartData == nil {\n\t\t\t\treturn errors.New(\"no SMART data in response\")\n\t\t\t}\n\t\t\td.Data = resp.SmartData\n\t\t\td.Complete = resp.SmartComplete\n\t\t\treturn nil\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"unexpected dest type for GetSmartData: %T\", dest)\n\t\t}\n\tcase common.GetSystemdInfo:\n\t\td, ok := dest.(*systemd.ServiceDetails)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"unexpected dest type for GetSystemdInfo: %T\", dest)\n\t\t}","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/henrygd/beszel/blob/b38fb7dafa60812cc22e6a84ce313e94f1ce0a32/internal/hub/transport/transport.go#L76-L112","documentation":"unmarshalLegacyResponse returns this when a GetSmartData response has resp.SmartData == nil for either dest type (*map[string]smart.SmartData or *smart.SmartDataResponse). The agent responded but included no S.M.A.R.T. data.","triggerScenarios":"UnmarshalResponse on a GetSmartData request where the legacy AgentResponse's SmartData field is nil.","commonSituations":"Host has no disks supporting SMART (VMs, containers); smartctl not installed or lacking permissions on the agent host; agent version not supporting SMART data; disks in the hub config that don't exist.","solutions":["Verify smartctl is installed and runnable (sudo smartctl --scan) on the agent host","Remove nonexistent disks from the hub's disk configuration, or add matching disks","Update the agent to a version supporting SMART data","Grant the agent permission to run smartctl (sudoers / capabilities)","If SMART is genuinely unavailable (VM), disable SMART monitoring for that system"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// only request SMART data for hosts/disks that support it\nif !hostSupportsSmart(host) { // e.g. bare metal with smartctl installed\n    return nil\n}","typeGuard":null,"tryCatchPattern":"if err := UnmarshalResponse(resp, common.GetSmartData, dest); err != nil {\n    if strings.Contains(err.Error(), \"no SMART data\") {\n        return nil // disable SMART panel for this system\n    }\n    return err\n}","preventionTips":["Install smartctl on agent hosts and grant permission","Remove VM/unsupported disks from SMART monitoring config","Verify disks exist before adding them to the hub"],"tags":["go","smart","disks","legacy-agent"],"backgroundTag":"missing-payload-in-response","analyzedSha":"b38fb7dafa60812cc22e6a84ce313e94f1ce0a32","analyzedAt":"2026-08-31T15:10:10.149Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}