Monitor TBW of ssd drives
Modify "zabbix_discovery_devices" to report disks by hardware type.
# cat /sys/block/sdn/queue/rotational
0
Use smartctl and find a generic method to monitor TBW. (https://askubuntu.com/questions/865792/how-can-i-monitor-the-tbw-on-my-samsung-ssd)
# smartctl -a /dev/sdn|egrep "Total_LBAs_Written"
241 Total_LBAs_Written 0x0032 100 100 000 Old_age Always - 407132
I too would like to use Zabbix to monitor TBW. Did you write a template for this?
I don't think so. But that should not be a big thing.
There are two templates:
- SMART Values: https://github.com/zabbix-tooling/zabbix-agent-extensions/blob/master/zabbix_templates/5.2/custom-os-linux-hardware.xml (if you can obtain the value by SMART)
- https://github.com/zabbix-tooling/zabbix-agent-extensions/blob/master/zabbix_templates/5.2/custom-os-linux-disk-performance-details.xml
I think the last one with its items should be the most suitable. (see also https://github.com/zabbix-tooling/zabbix-agent-extensions/blob/master/extension-files/agent-config/zabbix_disk_performance.conf)
I you like to implement that, i will appreciate a pull request.
I'm still running Zabbix server 4.0, I'm hoping to upgrade our Zabbix server to the latest LTS soon but I'll be sure to use Docker this time as I could not get Zabbix to upgrade correctly on my manually installed Zabbix server. I should've used mysql instead of mariadb it seems.
I have tried installing the archived Zabbix 4.4 version of the custom-os-linux-disk-performance-details.xml template on my Zabbix 4.0 server. It seemed to import it OK and I also installed zabbix-agent-extensions_2.6.1_all.deb on the client but its not working after applying that template so maybe Zabbix 4.4 is the minimum version required or maybe there is some extra config required to get the disk performance template to work?
According to https://github.com/zabbix-tooling/zabbix-agent-extensions that should be all I need to do to get the disk performance template to work. I don't see any disk performance data when I look at the the Latest data tab for the machine I added this template to.
I have found a Zabbix template that is able to monitor the health (wear levelling) of Samsung SATA SSDs. I have tested it with Zabbix 6.0
https://github.com/vargaloid/zabbix_template_samsung.ssd.smart