Giter Site home page Giter Site logo

ha-drive-monitor's Introduction

Drive Monitor

Drive Monitor is a Home Assistant (HA) integration that monitors storage devices attached to the host machine.

Unlike the built-in System Monitor integration, this includes all drives attached to the system, including RAIDs. It also exposes far more information about each, including temperature, SSD endurance, RAID health, etc.

This lets you set up alerts that provide advance warning before a drive fails.

Installation

  1. Install dependencies for your platform:

    MacOS

  2. Copy the drive_monitor directory to your custom_components directory.

  3. from the HA UI.

This integration is not yet available on HACS.

Warning: Currently this integration only supports Home Assistant Core on a MacOS host, since it uses diskutil for discovery of attached devices. It's designed to be extensible to other platforms, but that does require some code and understanding of tools or system commands similar to diskutil. See the Contribution Guidelines for details.

Usage

On start-up, the integration discovers all drives and RAIDs attached to the host machine. Each drive and RAID is exposed as a Device in HA.

For software RAIDs on platforms that support it (e.g. MacOS), the set of drives includes those that are part of a RAID. That enables monitoring of per-drive health metrics such as temperature and SSD wear thresholds, which wouldn't appear in the overall RAID status until after a drive fails.

Each Drive has the following entities:

  • State: State of the drive, one of the following values:

    • Healthy: Drive is passing S.M.A.R.T. checks.
    • Unhealthy: Drive is failing S.M.A.R.T. checks.
    • Unknown: Unable to query the drive's state, probably because it doesn't support S.M.A.R.T or this integration doesn't support querying it.
  • Capacity: Total capacity of the drive, in bytes.

  • Usage: Usage across all volumes on the drive, in bytes.

  • Temperature: Internal drive temperature.

Each RAID has the following entities:

  • State: State of the RAID, one of the following values:

    • Online: All RAID members are healthy.
    • Offline: One or more RAID members are unhealthy, and the RAID is degraded.
    • Rebuild: All RAID members are healthy, but some previous issue caused the overall state of the RAID to become degraded, and it is rebuilding itself.
    • Unknown: Unable to query the RAID's state.
  • Capacity: Total capacity of the drive, in bytes.

  • Usage: Usage across all volumes on the drive, in bytes.

Drives and RAIDs also populate standard Device attributes such as Manufacturer, Model, and Firmware Version, if available.

Warning: If you have a managed installation, i.e. HA OS/Container/Supervised, then some of these entities may have unknown / missing values, and you may not be able to discover underlying RAIDs. Although I haven't tested a VM myself, the hosts that I'm familiar with don't support S.M.A.R.T. on virtual disks, so at minimum drive health status will appear as Unknown.

Contributing

Please read the Contribution Guidelines before creating a pull request.

ha-drive-monitor's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.