1<?php 2 3/** 4 * Observium 5 * 6 * This file is part of Observium. 7 * 8 * @package observium 9 * @subpackage poller 10 * @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited 11 * 12 */ 13 14// Allied Telesis have somewhat messy MIBs. It's often hard to work out what is where. :) 15if (!$hardware) 16{ 17 // AtiSwitch-MIB::atiswitchProductType.0 = INTEGER: at8024GB(2) 18 // AtiSwitch-MIB::atiswitchSw.0 = STRING: AT-S39 19 // AtiSwitch-MIB::atiswitchSwVersion.0 = STRING: v3.3.0 20 21 $hardware = snmp_get($device, 'atiswitchProductType.0', '-OsvQU', 'AtiSwitch-MIB'); 22 if ($hardware) 23 { 24 $version = snmp_get($device, 'atiswitchSwVersion.0', '-OsvQU', 'AtiSwitch-MIB'); 25 $features = snmp_get($device, 'atiswitchSw.0', '-OsvQU', 'AtiSwitch-MIB'); 26 27 $hardware = str_replace('at', 'AT-', $hardware); 28 $version = str_replace('v', '', $version); 29 } else { 30 // AtiL2-MIB::atiL2SwProduct.0 = STRING: "AT-8326GB" 31 // AtiL2-MIB::atiL2SwVersion.0 = STRING: "AT-S41 v1.1.6 " 32 $hardware = snmp_get($device, 'atiL2SwProduct.0', '-OsvQU', 'AtiL2-MIB'); 33 if ($hardware) 34 { 35 $version = snmp_get($device, 'atiL2SwVersion.0', '-OsvQU', 'AtiL2-MIB'); 36 37 list($features, $version) = explode(' ', $version); 38 $version = str_replace('v', '', $version); 39 } 40 } 41} 42else if (!$version) 43{ 44 // Same as above 45 $version = snmp_get($device, 'atiswitchSwVersion.0', '-OsvQU', 'AtiSwitch-MIB'); 46 if (!$version) 47 { 48 $version = snmp_get($device, 'atiL2SwVersion.0', '-OsvQU', 'AtiL2-MIB'); 49 list($features, $version) = explode(' ', $version); 50 } 51 $version = str_replace('v', '', $version); 52} 53 54// EOF 55