1 | <?php |
||
2 | /** |
||
3 | * ros.inc.php |
||
4 | * |
||
5 | * LibreNMS os poller module for Siemens Ruggedcom Switches |
||
6 | * |
||
7 | * This program is free software: you can redistribute it and/or modify |
||
8 | * it under the terms of the GNU General Public License as published by |
||
9 | * the Free Software Foundation, either version 3 of the License, or |
||
10 | * (at your option) any later version. |
||
11 | * |
||
12 | * This program is distributed in the hope that it will be useful, |
||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the |
||
15 | * GNU General Public License for more details. |
||
16 | * |
||
17 | * You should have received a copy of the GNU General Public License |
||
18 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
||
19 | * |
||
20 | * @link https://www.librenms.org |
||
21 | * |
||
22 | * @copyright 2017 Lorenzo Zafra |
||
23 | * @author Lorenzo Zafra<[email protected]> |
||
24 | */ |
||
25 | preg_match('~(?\'hardware\'.*?)-(?:.*)~', $device['sysDescr'], $matches); |
||
26 | |||
27 | if ($matches['hardware']) { |
||
28 | $hardware = $matches['hardware']; |
||
29 | } |
||
30 | |||
31 | $version = trim(snmp_get($device, '.1.3.6.1.4.1.15004.4.2.3.3.0', '-Ovq'), '"'); |
||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
32 | $serial = trim(snmp_get($device, '.1.3.6.1.4.1.15004.4.2.3.1.0', '-Ovq'), '"'); |
||
33 |