[ZBXNEXT-8700] Add TBW support (for SATA SSDs) to Zabbix SMART template Created: 2023 Sep 12  Updated: 2025 Jul 14  Resolved: 2025 Jul 14

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Agent2 plugin (G)
Affects Version/s: None
Fix Version/s: None

Type: New Feature Request Priority: Low
Reporter: Dan MacDonald Assignee: Aleksandr Kotsegubov
Resolution: Won't Do Votes: 1
Labels: templates
Remaining Estimate: Not Specified
Time Spent: 13h
Original Estimate: Not Specified


 Description   

Recently I have come to realise that a SATA SSD passing a long or short smartctl test on a SATA SSD doesn't mean that the drives performance hasn't degraded.

It would seem that the correct way to test the health of a SATA SSD under Linux is to use one of these TBW (Total Bytes Written) scripts / commands which are based upon smartctl:

https://askubuntu.com/questions/865792/how-can-i-monitor-the-tbw-on-my-samsung-ssd

The current SMART template:

https://www.zabbix.com/integrations/smart

Has a percentage used item of NVMe disks but it seems to lack an equivalent for SATA disks which would be TBW.

I would like to see the Zabbix SMART template upgraded to support TBW for at least Samsung SSDs. I think it should alert by default when the TBW drops below 90%. I have a couple of disks with a TBW of 87% and it has brought the speed of the array (pool) down drastically.



 Comments   
Comment by dimir [ 2023 Sep 21 ]

Coming from https://www.zabbix.com/forum/zabbix-help/470638-monitoring-tbw-total-bytes-written-for-samsung-sata-ssds

Comment by Dan MacDonald [ 2023 Sep 29 ]

Actually, there's no need for that TBW script.

For Samsung SATA SSDs you can get the wear levelling count from smartctl:

smartctl -a /dev/sda | grep Wear | awk '{print $4}'

Comment by Dan MacDonald [ 2024 Feb 29 ]

I have found a Zabbix template that works for monitoring the wear levelling of Samsung SATA SSDs, even when they're connected to a RAID controller running in HBA/IT mode as is the case for me:

 

https://github.com/vargaloid/zabbix_template_samsung.ssd.smart

 

I have tested it with Zabbix 6.0, Ubuntu 22.04 and a Dell PowerEdge RAID controller of some sort.

Comment by Dan MacDonald [ 2024 Feb 29 ]

I have opened a ticket for it though because I think they need to adjust their default wear levelling trigger point by almost 90%

 

https://github.com/vargaloid/zabbix_template_samsung.ssd.smart/issues/2

Comment by Aleksandr Kotsegubov [ 2025 Jun 30 ]

During the research, we found that this parameter is not standardized. In this regard, each SSD manufacturer can name and calculate this parameter differently.

On the tested SSDs, with the same parameter name "Total_LBAs_Written", one SSD displayed data in gigabytes, the second in sectors. And there is no way to accurately determine whether the data will be displayed in GB, sectors or 32 MB chunks, since this depends solely on the SSD manufacturer.

The second problem is that in the case of displaying data in sectors, to obtain the TBW value, it is necessary to multiply "Total_LBAs_Written" by the sector size, which can also be different. In most cases, the size will be 512 bytes. However, in server and enterprise class SSDs, there may be options of 4096 bytes. Information about the sector size is also available in the smartctl output, but depending on the manufacturer, these may have different names: "Formatted LBA Size" or "Sector Size" on our test devices. We cannot predict what parameter names other manufacturers will have.

We cannot guarantee the correctness of the data obtained in a situation where the units depend on the manufacturer and there are no simple methods for determining in which case which units and which parameter names were used.

Conclusion: the implementation of this parameter is unpredictable. The parameters are not standardized and the interpretation of the value will depend on the manufacturer of a particular SSD. If this parameter is added, the values ​​on some SSDs may mislead the user.

Comment by Aleksandr Kotsegubov [ 2025 Jul 14 ]

I checked all available attributes of Smartctl output. There is no information about what units of measurement will be used. This parameter will not be added to the template because implementation of this parameter is unpredictable. The parameters are not standardized and the interpretation of the value will depend on the manufacturer of a particular SSD. If this parameter is added, the values ​​on some SSDs may mislead the user.

Generated at Wed Jul 16 07:14:43 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.