From 37b84f36d3f7cae0f5ff9400856e4c56ccc35aa8 Mon Sep 17 00:00:00 2001 From: David Bell Date: Mon, 6 Feb 2017 22:40:34 +0000 Subject: [PATCH] newdevice: Updated DCN serial/hardware/version detection #5785 --- includes/polling/os/dcn-software.inc.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/includes/polling/os/dcn-software.inc.php b/includes/polling/os/dcn-software.inc.php index 13aa5faa58..cca747dba7 100644 --- a/includes/polling/os/dcn-software.inc.php +++ b/includes/polling/os/dcn-software.inc.php @@ -23,8 +23,6 @@ * @author Neil Lathwood */ -preg_match('/([\w-]+) Device, .* SoftWare Version ([\w\.\(\)]+) .* Serial No.:([\w]+) .*/', $poll_device['sysDescr'], $match); - -$hardware = $match[1]; -$version = $match[2]; -$serial = $match[3]; +$hardware = trim(snmp_get($device, '.1.3.6.1.4.1.6339.100.25.1.1.1.0', '-OQv'), '"'); +$version = trim(snmp_get($device, '.1.3.6.1.4.1.6339.100.25.1.1.2.0', '-OQv'), '"'); +$serial = trim(snmp_get($device, '.1.3.6.1.2.1.47.1.1.1.1.11.1', '-OQv'), '"');