mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* added hardware info cleanup os version * allow minor revision to be larger than 9 * Update edgeos.inc.php * snmprec * Create edgeos.json
15 lines
465 B
PHP
15 lines
465 B
PHP
<?php
|
|
// Version is second word in sysDescr
|
|
list(, $version) = explode(' ', $device['sysDescr']);
|
|
preg_match('/v[0-9]+.[0-9]+.[0-9]+/', $version, $matches);
|
|
$version = $matches[0];
|
|
|
|
$hw = snmp_get($device, '.1.3.6.1.2.1.25.4.2.1.5.3818', '-Ovq');
|
|
if (strpos('running on', $hw) === false) {
|
|
$hw = snmp_get($device, '.1.3.6.1.2.1.25.4.2.1.5.3819', '-Ovq');
|
|
}
|
|
preg_match('/(?<=UBNT )(.*)(?= running on)/', $hw, $matches);
|
|
$hardware = $matches[0];
|
|
|
|
$features = '';
|