Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add smart to HA data #31

Open
HarlemSquirrel opened this issue Jan 4, 2024 · 0 comments
Open

Add smart to HA data #31

HarlemSquirrel opened this issue Jan 4, 2024 · 0 comments

Comments

@HarlemSquirrel
Copy link

HarlemSquirrel commented Jan 4, 2024

I would like to be able to see at least some basic SMART data from Glances in Home Assistant so I can set up alerts/automation for potential disk issues.

Here's a sample output from my instance at /api/3/smart

[
  {
    "DeviceName": "sda Hitachi HDS721010CLA330",
    "1": {
      "name": "Raw_Read_Error_Rate",
      "flags": "1",
      "raw": "0",
      "value": "100",
      "worst": "100",
      "threshold": "016",
      "type": "Pre-fail",
      "updated": "Always",
      "when_failed": "-"
    },
    "2": {
      "name": "Throughput_Performance",
      "flags": "2",
      "raw": "95",
      "value": "136",
      "worst": "136",
      "threshold": "054",
      "type": "Pre-fail",
      "updated": "Offline",
      "when_failed": "-"
    },
    "3": {
      "name": "Spin_Up_Time",
      "flags": "3",
      "raw": "286",
      "value": "135",
      "worst": "135",
      "threshold": "024",
      "type": "Pre-fail",
      "updated": "Always",
      "when_failed": "-"
    },
    "4": {
      "name": "Start_Stop_Count",
      "flags": "4",
      "raw": "1982",
      "value": "100",
      "worst": "100",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "5": {
      "name": "Reallocated_Sector_Ct",
      "flags": "5",
      "raw": "0",
      "value": "100",
      "worst": "100",
      "threshold": "005",
      "type": "Pre-fail",
      "updated": "Always",
      "when_failed": "-"
    },
    "7": {
      "name": "Seek_Error_Rate",
      "flags": "7",
      "raw": "0",
      "value": "100",
      "worst": "100",
      "threshold": "067",
      "type": "Pre-fail",
      "updated": "Always",
      "when_failed": "-"
    },
    "8": {
      "name": "Seek_Time_Performance",
      "flags": "8",
      "raw": "31",
      "value": "138",
      "worst": "138",
      "threshold": "020",
      "type": "Pre-fail",
      "updated": "Offline",
      "when_failed": "-"
    },
    "9": {
      "name": "Power_On_Hours",
      "flags": "9",
      "raw": "14602",
      "value": "098",
      "worst": "098",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "10": {
      "name": "Spin_Retry_Count",
      "flags": "0",
      "raw": "0",
      "value": "100",
      "worst": "100",
      "threshold": "060",
      "type": "Pre-fail",
      "updated": "Always",
      "when_failed": "-"
    },
    "12": {
      "name": "Power_Cycle_Count",
      "flags": "2",
      "raw": "1706",
      "value": "100",
      "worst": "100",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "192": {
      "name": "Power-Off_Retract_Count",
      "flags": "2",
      "raw": "1991",
      "value": "099",
      "worst": "099",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "193": {
      "name": "Load_Cycle_Count",
      "flags": "3",
      "raw": "1991",
      "value": "099",
      "worst": "099",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "194": {
      "name": "Temperature_Celsius",
      "flags": "4",
      "raw": "25",
      "value": "240",
      "worst": "240",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "196": {
      "name": "Reallocated_Event_Count",
      "flags": "6",
      "raw": "0",
      "value": "100",
      "worst": "100",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "197": {
      "name": "Current_Pending_Sector",
      "flags": "7",
      "raw": "0",
      "value": "100",
      "worst": "100",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "198": {
      "name": "Offline_Uncorrectable",
      "flags": "8",
      "raw": "0",
      "value": "100",
      "worst": "100",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Offline",
      "when_failed": "-"
    },
    "199": {
      "name": "UDMA_CRC_Error_Count",
      "flags": "9",
      "raw": "0",
      "value": "200",
      "worst": "200",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    }
  },
  {
    "DeviceName": "sdb WDC WD20EZRX-00D8PB0",
    "1": {
      "name": "Raw_Read_Error_Rate",
      "flags": "1",
      "raw": "449",
      "value": "200",
      "worst": "199",
      "threshold": "051",
      "type": "Pre-fail",
      "updated": "Always",
      "when_failed": "-"
    },
    "3": {
      "name": "Spin_Up_Time",
      "flags": "3",
      "raw": "4391",
      "value": "172",
      "worst": "166",
      "threshold": "021",
      "type": "Pre-fail",
      "updated": "Always",
      "when_failed": "-"
    },
    "4": {
      "name": "Start_Stop_Count",
      "flags": "4",
      "raw": "3123",
      "value": "097",
      "worst": "097",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "5": {
      "name": "Reallocated_Sector_Ct",
      "flags": "5",
      "raw": "0",
      "value": "200",
      "worst": "200",
      "threshold": "140",
      "type": "Pre-fail",
      "updated": "Always",
      "when_failed": "-"
    },
    "7": {
      "name": "Seek_Error_Rate",
      "flags": "7",
      "raw": "0",
      "value": "200",
      "worst": "200",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "9": {
      "name": "Power_On_Hours",
      "flags": "9",
      "raw": "17776",
      "value": "076",
      "worst": "076",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "10": {
      "name": "Spin_Retry_Count",
      "flags": "0",
      "raw": "0",
      "value": "100",
      "worst": "100",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "11": {
      "name": "Calibration_Retry_Count",
      "flags": "1",
      "raw": "0",
      "value": "100",
      "worst": "100",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "12": {
      "name": "Power_Cycle_Count",
      "flags": "2",
      "raw": "3098",
      "value": "097",
      "worst": "097",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "192": {
      "name": "Power-Off_Retract_Count",
      "flags": "2",
      "raw": "475",
      "value": "200",
      "worst": "200",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "193": {
      "name": "Load_Cycle_Count",
      "flags": "3",
      "raw": "1110694",
      "value": "001",
      "worst": "001",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "194": {
      "name": "Temperature_Celsius",
      "flags": "4",
      "raw": "23",
      "value": "124",
      "worst": "102",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "196": {
      "name": "Reallocated_Event_Count",
      "flags": "6",
      "raw": "0",
      "value": "200",
      "worst": "200",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "197": {
      "name": "Current_Pending_Sector",
      "flags": "7",
      "raw": "10",
      "value": "200",
      "worst": "200",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "198": {
      "name": "Offline_Uncorrectable",
      "flags": "8",
      "raw": "10",
      "value": "200",
      "worst": "200",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Offline",
      "when_failed": "-"
    },
    "199": {
      "name": "UDMA_CRC_Error_Count",
      "flags": "9",
      "raw": "0",
      "value": "200",
      "worst": "200",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "200": {
      "name": "Multi_Zone_Error_Rate",
      "flags": "0",
      "raw": "11",
      "value": "200",
      "worst": "200",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Offline",
      "when_failed": "-"
    }
  },
  {
    "DeviceName": "sdc WDC WD5000AAKX-60U6AA0",
    "1": {
      "name": "Raw_Read_Error_Rate",
      "flags": "1",
      "raw": "0",
      "value": "200",
      "worst": "200",
      "threshold": "051",
      "type": "Pre-fail",
      "updated": "Always",
      "when_failed": "-"
    },
    "3": {
      "name": "Spin_Up_Time",
      "flags": "3",
      "raw": "3816",
      "value": "143",
      "worst": "141",
      "threshold": "021",
      "type": "Pre-fail",
      "updated": "Always",
      "when_failed": "-"
    },
    "4": {
      "name": "Start_Stop_Count",
      "flags": "4",
      "raw": "459",
      "value": "100",
      "worst": "100",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "5": {
      "name": "Reallocated_Sector_Ct",
      "flags": "5",
      "raw": "0",
      "value": "200",
      "worst": "200",
      "threshold": "140",
      "type": "Pre-fail",
      "updated": "Always",
      "when_failed": "-"
    },
    "7": {
      "name": "Seek_Error_Rate",
      "flags": "7",
      "raw": "0",
      "value": "200",
      "worst": "200",
      "threshold": "051",
      "type": "Pre-fail",
      "updated": "Always",
      "when_failed": "-"
    },
    "9": {
      "name": "Power_On_Hours",
      "flags": "9",
      "raw": "8014",
      "value": "090",
      "worst": "089",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "10": {
      "name": "Spin_Retry_Count",
      "flags": "0",
      "raw": "0",
      "value": "100",
      "worst": "100",
      "threshold": "051",
      "type": "Pre-fail",
      "updated": "Always",
      "when_failed": "-"
    },
    "11": {
      "name": "Calibration_Retry_Count",
      "flags": "1",
      "raw": "0",
      "value": "100",
      "worst": "100",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "12": {
      "name": "Power_Cycle_Count",
      "flags": "2",
      "raw": "401",
      "value": "100",
      "worst": "100",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "184": {
      "name": "End-to-End_Error",
      "flags": "4",
      "raw": "0",
      "value": "100",
      "worst": "100",
      "threshold": "097",
      "type": "Pre-fail",
      "updated": "Always",
      "when_failed": "-"
    },
    "187": {
      "name": "Reported_Uncorrect",
      "flags": "7",
      "raw": "0",
      "value": "100",
      "worst": "100",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "188": {
      "name": "Command_Timeout",
      "flags": "8",
      "raw": "0",
      "value": "100",
      "worst": "100",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "190": {
      "name": "Airflow_Temperature_Cel",
      "flags": "0",
      "raw": "26",
      "value": "074",
      "worst": "054",
      "threshold": "040",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "192": {
      "name": "Power-Off_Retract_Count",
      "flags": "2",
      "raw": "57",
      "value": "200",
      "worst": "200",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "193": {
      "name": "Load_Cycle_Count",
      "flags": "3",
      "raw": "401",
      "value": "200",
      "worst": "200",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "196": {
      "name": "Reallocated_Event_Count",
      "flags": "6",
      "raw": "0",
      "value": "200",
      "worst": "200",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "197": {
      "name": "Current_Pending_Sector",
      "flags": "7",
      "raw": "0",
      "value": "200",
      "worst": "200",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "198": {
      "name": "Offline_Uncorrectable",
      "flags": "8",
      "raw": "0",
      "value": "200",
      "worst": "200",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Offline",
      "when_failed": "-"
    },
    "199": {
      "name": "UDMA_CRC_Error_Count",
      "flags": "9",
      "raw": "0",
      "value": "200",
      "worst": "200",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Always",
      "when_failed": "-"
    },
    "200": {
      "name": "Multi_Zone_Error_Rate",
      "flags": "0",
      "raw": "0",
      "value": "200",
      "worst": "200",
      "threshold": "000",
      "type": "Old_age",
      "updated": "Offline",
      "when_failed": "-"
    }
  }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant