Files
librenms-librenms/includes/polling/os/edgeos.inc.php
crcro 3ad698ff98 Added edgeos hardware info (#9867)
* added hardware info
cleanup os version

* allow minor revision to be larger than 9

* Update edgeos.inc.php

* snmprec

* Create edgeos.json
2019-03-01 01:00:01 +01:00

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 = '';