collector/diskstats: Use SCSI_IDENT_SERIAL as serial (#2612)
On most hard drives, `ID_SERIAL_SHORT` and `SCSI_IDENT_SERIAL` are identical, but on some SAS drives they do differ. In that case, `SCSI_IDENT_SERIAL` corresponds to the serial number printed on the drive label, and to the value returned by `smartctl -i`. So use that value by default for the `serial` label on the `node_disk_info` metric, and fallback to `ID_SERIAL_SHORT` only if it's undefined. Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>pull/2592/head^2
parent
da0b2ca3c2
commit
c05b97ce32
Loading…
Reference in new issue