Files
librenms-librenms/includes/polling/os/picos.inc.php
PipoCanaja 3742e4f7ac Add basic support for PICA8 devices (#11185)
* mib

* os_support

* polling

* tests

* codeclimate
2020-02-26 01:28:56 +01:00

30 lines
794 B
PHP

<?php
/*
* LibreNMS
*
* Copyright (c) 2015 Søren Friis Rosiak <sorenrosiak@gmail.com>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
preg_match("/ for ([^\s]*)/m", $device['sysDescr'], $matches);
if (!empty($matches[1])) {
$hardware .= trim($matches[1]);
}
$oidList = [
'PICA-PRIVATE-MIB::hostStatusGroup.16.0',
];
foreach ($oidList as $oid) {
$serial_tmp = snmp_get($device, $oid, '-OQv');
if (!empty($serial_tmp)) {
$serial = $serial_tmp;
break;
}
}