-
Type:
Problem report
-
Resolution: Unresolved
-
Priority:
Trivial
-
None
-
Affects Version/s: 7.4.14
-
Component/s: Agent2 plugin (G)
smart.disk.discovery uses the generic device type returned by smartctl --scan, although smartctl --scan-open detects a more appropriate SAT access method.
This causes Zabbix to retrieve only limited SCSI SMART information from SATA drives behind a controller.
Example
Dell/Intel SATA SSDs behind a Dell PERC controller.
smartctl --scan reports:
{{/dev/sda -d scsi # /dev/sda, SCSI device
/dev/sdb -d scsi # /dev/sdb, SCSI device
/dev/bus/0 -d megaraid,0 # /dev/bus/0 [megaraid_disk_00], SCSI device
/dev/bus/0 -d megaraid,1 # /dev/bus/0 [megaraid_disk_01], SCSI device}}
Zabbix consequently discovers:
{{
{ "\{#NAME}": "sda scsi",
"{#DISKTYPE}": "ssd",
"{#MODEL}": "",
"{#SN}": "PHYS7310027M480BGN",
"{#PATH}": "/dev/sda",
"{#RAIDTYPE}": "scsi",
"{#ATTRIBUTES}": ""
}}}
and subsequently queries the device using scsi:
smart.disk.get[/dev/sda,"scsi"]
This only returns a limited data set, for example:
{{
{ "disk_type": "ssd", "firmware_version": "", "model_name": "", "percentage_used": 0, "power_on_time": 0, "serial_number": "PHYS7310027M480BGN", "temperature": 26 }}}
However, smartctl --scan-open correctly detects the devices as SAT:
{{/dev/sda -d sat # /dev/sda [SAT], ATA device
/dev/sdb -d sat # /dev/sdb [SAT], ATA device
/dev/bus/0 -d sat+megaraid,0 # /dev/bus/0 [megaraid_disk_00] [SAT], ATA device
/dev/bus/0 -d sat+megaraid,1 # /dev/bus/0 [megaraid_disk_01] [SAT], ATA device}}
Using either automatic detection or explicitly specifying SAT:
{{smartctl -a /dev/sda
smartctl -a -d sat /dev/sda}}
provides the complete ATA SMART information, including:
- model and firmware
- power-on hours
- ATA SMART attributes
- reallocated/pending/uncorrectable sectors
- SSD endurance information
- host reads/writes
- CRC errors
- power cycles / unsafe shutdowns
For example, the actual device reports:
{{Device Model: SSDSC2KB480G7R
Firmware Version: SCV1DL5C
Power_On_Hours: 75754
Percent_Life_Remaining: 67}}
while the Zabbix query using scsi reports empty model/firmware and zero power-on time.
Expected behavior
SMART discovery should use the most appropriate access method detected by smartmontools.
Using smartctl --scan-open, or performing equivalent device-type autodetection during discovery, would allow Agent2 to distinguish SATA devices behind SAT from actual SCSI/SAS devices.
For this example the resulting discovery should use:
{{
{#RAIDTYPE} = "sat"}}instead of:
{{{#RAIDTYPE}
= "scsi"}}
and correspondingly preserve sat+megaraid,N where detected.
This is relevant because the device type selected during discovery is later reused by smart.disk.get[]; selecting scsi therefore permanently restricts the SMART information available to the official template.
- related to
-
ZBX-25632 Kernel errors on disk scanning with agent2 SMART plugin. deprecated SCSI ioctl
-
- READY TO DEVELOP
-