mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Use the sysDescr we've already polled in the core module
This commit is contained in:
@@ -10,8 +10,7 @@
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$sysdescr = snmp_get($device, 'SNMPv2-MIB::sysDescr.0', '-Ovq');
|
||||
preg_match_all('/^(MSM\d{3})|Serial number ([\S]+)|Firmware version (\d+\.\d+\.\d+\.\d+-\d+)/', $sysdescr, $matches);
|
||||
preg_match_all('/^(MSM\d{3})|Serial number ([\S]+)|Firmware version (\d+\.\d+\.\d+\.\d+-\d+)/', $poll_device['sysDescr'], $matches);
|
||||
$hardware = $matches[1][0];
|
||||
$serial = $matches[2][1];
|
||||
$version = $matches[3][2];
|
||||
|
||||
Reference in New Issue
Block a user