Monitoring disk health on VMware ESXi with smartctl
- VMware , Monitoring
- June 27, 2025
Table of Contents
Standalone ESXi hosts and small vSphere clusters often run on local SATA or SAS disks — in a homelab, a branch office, or a backup host. When one of those disks starts to fail, you want to know about it from your monitoring, not from a datastore that suddenly goes read-only.
On a normal Linux server the answer is smartctl from smartmontools. ESXi doesn’t ship it, and its built-in esxcli storage core device smart get returns only a handful of values (and often N/A for disks behind a controller). We packaged smartctl as a VIB so it can be installed on ESXi like any other host package.
Project: github.com/bsv9/smartctl-esxi-vib — smartctl 7.5 for ESXi 7, 8 and 9.
Warning
The VIB is community-supported and unsigned by VMware, so it does not work on hosts with Secure Boot enabled. Use it where you control the host configuration and understand the support implications.
Installation
-
Download the latest VIB, for example smartctl-7.5-5714.x86_64.vib.
-
Copy it to
/tmp/on the ESXi host:scp smartctl-7.5-5714.x86_64.vib root@esxi-host:/tmp/ -
SSH to the host and allow community-supported packages:
esxcli software acceptance set --level=CommunitySupported -
Install the package. Neither maintenance mode nor a reboot is required:
esxcli software vib install -v /tmp/smartctl-7.5-5714.x86_64.vib
The binary is installed to /opt/smartmontools/smartctl. You can check the package with esxcli software vib get -n smartctl and remove it at any time, again without a reboot:
esxcli software vib remove -n smartctl
Reading SMART data
Find your disks under /dev/disks/ (or with esxcli storage core device list) and query one of them. For SATA disks, -d sat,auto lets smartctl pick the right pass-through:
[root@host:~] /opt/smartmontools/smartctl -s on -d sat,auto -A /dev/disks/t10.ATA_____ST2000VX0082D2E3164__________________________________Z52C5LJ1
smartctl 7.5 2025-04-30 r5714 [x86_64-linux-8.0.3] (local build)
Copyright (C) 2002-25, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 114 099 006 Pre-fail Always - 69586192
3 Spin_Up_Time 0x0003 096 096 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 118
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 072 060 030 Pre-fail Always - 18572538
9 Power_On_Hours 0x0032 091 091 000 Old_age Always - 8349h+00m+00.000s
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 109
184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0
189 High_Fly_Writes 0x003a 096 096 000 Old_age Always - 4
190 Airflow_Temperature_Cel 0x0022 071 055 045 Old_age Always - 29 (Min/Max 19/29)
191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 0
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 102
193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 130
194 Temperature_Celsius 0x0022 029 045 000 Old_age Always - 29 (0 19 0 0 0)
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
[root@host:~] uname -a
VMkernel host 8.0.3 #1 SMP Release build-24022510 Jun 11 2024 05:59:34 x86_64 x86_64 x86_64 ESXi
Useful variations:
smartctl -H <disk>— the overall health verdict (PASSED/FAILED).smartctl -a <disk>— everything: identity, attributes, error log and self-test log.smartctl -t short <disk>— start a short self-test; read the result later with-l selftest.
Which attributes actually matter
Most of the table is informational. Raw values of attributes such as Raw_Read_Error_Rate or Seek_Error_Rate are vendor-encoded and look alarming on Seagate drives even when the disk is perfectly healthy. The ones worth alerting on are:
| ID | Attribute | Why it matters |
|---|---|---|
| 5 | Reallocated_Sector_Ct | Sectors already remapped to spares. Any growth is a warning sign. |
| 197 | Current_Pending_Sector | Unreadable sectors waiting to be remapped. Non-zero means data is at risk. |
| 198 | Offline_Uncorrectable | Sectors that could not be read during offline scans. |
| 187 | Reported_Uncorrect | Errors the drive could not correct with ECC. |
| 188 | Command_Timeout | Often points to cabling, power or controller trouble. |
| 199 | UDMA_CRC_Error_Count | Transfer errors between disk and controller — usually a bad cable or backplane. |
| 194 | Temperature_Celsius | Sustained high temperatures shorten disk life. |
A practical rule: alert on any increase of 5, 197, 198 and 187, and on temperature above the drive’s rated limit (typically 50–60 °C for HDDs).
Feeding the data into Zabbix
Tip
Don’t want to build the items by hand? Our ready-made template does all of this, with disk discovery and triggers — see ESXi disk health in Zabbix. Below is how it works under the hood.
ESXi cannot run a Zabbix agent, and its SNMP agent does not expose SMART attributes. The simplest reliable approach is to let the Zabbix server or proxy run smartctl over SSH:
-
Enable SSH on the host and add a dedicated key for the Zabbix user (keys live in
/etc/ssh/keys-root/authorized_keyson ESXi). -
Create an item of type SSH agent with public-key authentication, for example key
ssh.run[smart.disk1.realloc]and the command:/opt/smartmontools/smartctl -A -d sat,auto /dev/disks/<disk-id> | awk '$1==5 {print $10}' -
Repeat for the attributes from the table above (or return the full
-Aoutput into one text item and extract values with dependent items and regular-expression preprocessing — one SSH call per disk instead of one per attribute). -
Add triggers such as
change(/esxi-host/ssh.run[smart.disk1.realloc])>0and a threshold on temperature.
Poll every 15–30 minutes: SMART values change slowly, and there is no point in waking the disks more often.
The same data can of course go to Prometheus or any other system that can run a remote command; the important part is that smartctl is now available on the host.
Summary
- Install smartctl as a VIB: no reboot, no maintenance mode, works on ESXi 7, 8 and 9 (without Secure Boot).
- Use
/opt/smartmontools/smartctlexactly as on Linux. - Alert on reallocated, pending and uncorrectable sectors and on temperature — not on raw read/seek error rates.
Need help setting up monitoring for your vSphere or Proxmox infrastructure? Get in touch.