2017-01-25 23:51:41 +02:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* LibreNMS
|
|
|
|
*
|
|
|
|
* Copyright (c) 2017 Aldemir Akpinar <aldemir.akpinar@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.
|
|
|
|
*/
|
|
|
|
|
2018-03-25 23:57:13 +03:00
|
|
|
$oids = array(
|
|
|
|
'hardware' => $device['sysObjectID'].'.1.2.0',
|
|
|
|
'version' => $device['sysObjectID'].'.1.4.0',
|
|
|
|
'serial' => $device['sysObjectID'].'.1.78.0',
|
|
|
|
);
|
2019-03-05 08:19:16 +02:00
|
|
|
|
2018-03-25 23:57:13 +03:00
|
|
|
$os_data = snmp_get_multi_oid($device, $oids);
|
2017-01-25 23:51:41 +02:00
|
|
|
|
2018-03-25 23:57:13 +03:00
|
|
|
foreach ($oids as $var => $oid) {
|
|
|
|
$$var = trim($os_data[$oid], '"');
|
2017-10-26 10:41:50 +00:00
|
|
|
}
|
2018-03-25 23:57:13 +03:00
|
|
|
|
|
|
|
unset($oids, $os_data);
|