mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix:: Fixed display of WD drives for smart application (#8471)
WD drives have a dash in the serial number, e.g. WD-WCCXXXXXXXXX. The librenms-agent script changed to using serial numbers in librenms/librenms-agent@3a84624615 As we split the name by the same char, we discarded everything after WD, which made all WD drives in the system appear as one, and broke the generated links.
This commit is contained in:
committed by
Neil Lathwood
parent
8ec6fc03d6
commit
97d58cc121
@@ -1595,7 +1595,7 @@ function get_disks_with_smart($device, $app_id)
|
||||
foreach (glob($pattern) as $rrd) {
|
||||
$filename = basename($rrd, '.rrd');
|
||||
|
||||
list(,,, $disk) = explode("-", $filename);
|
||||
list(,,, $disk) = explode("-", $filename, 4);
|
||||
|
||||
if ($disk) {
|
||||
array_push($disks, $disk);
|
||||
|
Reference in New Issue
Block a user