mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. * Add support for Nokia SAS-Sx 7210 * Revert "I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md." This reverts commit 2b89f9edb53dc493201102e9dd00db3a911ffc01. * Edited hardware regex to cover more sample data
23 lines
1.1 KiB
PHP
23 lines
1.1 KiB
PHP
<?php
|
|
|
|
//SNMPv2-SMI::enterprises.6527.3.1.2.1.1.5.0 = Gauge32: 9 - sgiSwMajorVersion
|
|
//SNMPv2-SMI::enterprises.6527.3.1.2.1.1.6.0 = Gauge32: 0 - sgiSwMinorVersion
|
|
//SNMPv2-SMI::enterprises.6527.3.1.2.1.1.7.0 = STRING: "R3" - sgiSwVersionModifier
|
|
|
|
$majorVersion = trim(snmp_get($device, '1.3.6.1.4.1.6527.3.1.2.1.1.5.0', '-OQv', '', ''), '" ');
|
|
$minorVersion = trim(snmp_get($device, '1.3.6.1.4.1.6527.3.1.2.1.1.6.0', '-OQv', '', ''), '" ');
|
|
$versionModifier = trim(snmp_get($device, '1.3.6.1.4.1.6527.3.1.2.1.1.7.0', '-OQv', '', ''), '" ');
|
|
|
|
$version = 'v' . $majorVersion . '.' . $minorVersion . '.' . $versionModifier;
|
|
|
|
//SNMPv2-MIB::sysDescr.0 = STRING: TiMOS-B-9.0.R3 both/hops Nokia SAS-Sx 48Tp4SFP+ (PoE) 7210 Copyright (c) 2000-2017 Nokia.
|
|
//All rights reserved. All use subject to applicable license agreements.
|
|
//Built on Thu Jan 5 11:01:16 IST 2017 by builder in /home/builder/9.0B1/R3/panos/main
|
|
|
|
$pattern = "~(cpm|both)\/(hops64|hops|x86_64) (?'hardware'.*)\sCopyright~";
|
|
preg_match($pattern, $poll_device['sysDescr'], $matches);
|
|
|
|
if ($matches['hardware']) {
|
|
$hardware = $matches['hardware'];
|
|
}
|