munkireport/smart_stats

Module for munkireport.

v3.0 2023-05-06 03:48 UTC

This package is auto-updated.

Last update: 2024-12-19 07:20:44 UTC


README

Collects data from a drive's SMART attributes.

Dependency

smart_stats module requires smartctl, a part of smartmontools: https://www.smartmontools.org/

Download the latest version of smartmontools for macOS from the official repository here: https://github.com/smartmontools/smartmontools/releases

Munki: The downloaded smartmontools package has a name that conflicts with Munki's versioning. To avoid an error, import the downloaded DMG file directly instead of the PKG it contains.

Notes

Starting with smartmontools 6.6 (released October of 2017), the SMART Stats module supports NVMe drives. NVMe drives will not fully appear in the SMART Stats listing, but all available data is in the client tab.

Configuration

smart_stats module has one settings that can be managed by adding them to the server environment variables or the .env file.

keep_smart_stats_historical=TRUE

Table Schema

The following information is stored in the smart_stats table:

  • disk_number - int - device id (/dev/diskX)
  • model_family - varchar(255) - Family model of the disk
  • device_model - varchar(255) - Device model of the disk
  • serial_number_hdd - varchar(255) - Disk serial number
  • lu_wwn_device_id - varchar(255)
  • firmware_version - varchar(255) - Firmware version of disk
  • user_capacity - varchar(255) - Raw capacity of disk
  • sector_size - varchar(255) - Reported sector size of disk
  • rotation_rate - varchar(255) - Rotation rate of disk
  • device_is - varchar(255) - Status of disk in smartctl's database
  • ata_version_is - varchar(255) - Information about ATA protocol in use
  • sata_version_is - varchar(255) - Information about SATA protocol in use
  • form_factor - varchar(255) - Form factor of drive
  • smart_support_is - varchar(255) - SMART support about drive
  • smart_is - varchar(255) - Is SMART enabled
  • error_count - int - Amount of SMART errors
  • error_poh - int - Power on hour count at last SMART error
  • timestamp - int - Timestamp of last data pull

All other table columns correspond with SMART attributes.