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:
Michael Corcoran
2018-03-27 02:36:38 +13:00
committed by Neil Lathwood
parent 8ec6fc03d6
commit 97d58cc121

View File

@@ -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);