increase mempool_index size to accomodate larger indexes

git-svn-id: http://www.observium.org/svn/observer/trunk@1646 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-08-04 17:17:00 +00:00
parent 53a4e91e8c
commit de0b283b7a
11 changed files with 62 additions and 51 deletions
-1
View File
@@ -22,5 +22,4 @@ $entPhysicalVendorTypes = array (
'cevMGBIC1000BaseLX' => '1000BaseLX GBIC',
'cevPort10GigBaseLR' => '10GigBaseLR');
?>
+10 -2
View File
@@ -35,7 +35,15 @@ if ($device['os'] == "ios" || $device['os_group'] == "ios")
{
$entPhysicalIndex = $index;
$descr = snmp_get($device, "entPhysicalName.".$index, "-Oqv", "ENTITY-MIB");
if(!$descr) { $descr = snmp_get($device, "entPhysicalDescr.".$index, "-Oqv", "ENTITY-MIB"); }
if($descr || $device['os'] == "iosxr")
{
$descr = rewrite_entity_descr($descr);
} else {
$descr = snmp_get($device, "entPhysicalDescr.".$index, "-Oqv", "ENTITY-MIB");
$descr = rewrite_entity_descr($descr);
}
if(is_numeric($entry['entSensorMeasuredEntity']) && $entry['entSensorMeasuredEntity']) {
$measured_descr = snmp_get($device, "entPhysicalName.".$entry['entSensorMeasuredEntity'],"-Oqv", "ENTITY-MIB");
if(!measured_descr) { $measured_descr = snmp_get($device, "entPhysicalDescr.".$entry['entSensorMeasuredEntity'],"-Oqv", "ENTITY-MIB");}
@@ -44,7 +52,7 @@ if ($device['os'] == "ios" || $device['os_group'] == "ios")
### Bit dirty also, clean later
$descr = str_replace("Temp: ", "", $descr);
$descr = str_ireplace("temperature ", "", $descr);
$descr = str_ireplace("temperature ", "", $descr);
$oid = ".1.3.6.1.4.1.9.9.91.1.1.1.1.4.".$index;
$current = $entry['entSensorValue'];
+5 -5
View File
@@ -5,9 +5,9 @@ echo("Doing Allied Telesyn AlliedWare ");
### Allied Telesis have somewhat messy MIBs. It's often hard to work out what is where. :)
$hardware = snmp_get($device, "atiswitchProductType.0", "-OsvQU", "+AtiSwitch-MIB", "+".$config['mib_dir']."/alliedtelesis");
$version = snmp_get($device, "atiswitchSwVersion.0", "-OsvQU", "+AtiSwitch-MIB", "+".$config['mib_dir']."/alliedtelesis");
$software = snmp_get($device, "atiswitchSw.0", "-OsvQU", "+AtiSwitch-MIB", "+".$config['mib_dir']."/alliedtelesis");
$hardware = snmp_get($device, "atiswitchProductType.0", "-OsvQU", "+AtiSwitch-MIB");
$version = snmp_get($device, "atiswitchSwVersion.0", "-OsvQU", "+AtiSwitch-MIB");
$software = snmp_get($device, "atiswitchSw.0", "-OsvQU", "+AtiSwitch-MIB");
if($software && $version)
$version = $software . " " . $version;
@@ -22,8 +22,8 @@ if($software && $version)
# AtiL2-MIB::atiL2SwVersion.0 = STRING: "AT-S41 v1.1.6 "
if(!$hardware && !$version && !$features) {
$hardware = snmp_get($device, "atiL2SwProduct.0", "-OsvQU", "+AtiL2-MIB", "+".$config['mib_dir']."/alliedtelesis");
$version = snmp_get($device, "atiL2SwVersion.0", "-OsvQU", "+AtiL2-MIB", "+".$config['mib_dir']."/alliedtelesis");
$hardware = snmp_get($device, "atiL2SwProduct.0", "-OsvQU", "+AtiL2-MIB");
$version = snmp_get($device, "atiL2SwVersion.0", "-OsvQU", "+AtiL2-MIB");
}
#Allied Telesyn AT-8948 version 2.7.4-02 22-Aug-2005
+3 -3
View File
@@ -36,15 +36,15 @@ $hardware = rewrite_ftos_hardware($sysObjectID);
if(strstr($sysObjectID, ".1.3.6.1.4.1.6027.1.3."))
{
echo("S-Series ");
$version = snmp_get($device, "chStackUnitCodeVersion.1", "-Oqvn", "F10-S-SERIES-CHASSIS-MIB", $config['mib_dir'].":".$config['mib_dir']."/ftos");
$version = snmp_get($device, "chStackUnitCodeVersion.1", "-Oqvn", "F10-S-SERIES-CHASSIS-MIB");
} elseif(strstr($sysObjectID, ".1.3.6.1.4.1.6027.1.2."))
{
echo("C-Series ");
$version = snmp_get($device, "chSwVersion.0", "-Oqvn", "F10-C-SERIES-CHASSIS-MIB", $config['mib_dir'].":".$config['mib_dir']."/ftos");
$version = snmp_get($device, "chSwVersion.0", "-Oqvn", "F10-C-SERIES-CHASSIS-MIB");
} else
{
echo("E-Series ");
$version = snmp_get($device, "chSysSwRuntimeImgVersion.1.1", "-Oqvn", "F10-CHASSIS-MIB", $config['mib_dir'].":".$config['mib_dir']."/ftos");
$version = snmp_get($device, "chSysSwRuntimeImgVersion.1.1", "-Oqvn", "F10-CHASSIS-MIB");
}
$version = str_replace("\"","", $version);
+1 -1
View File
@@ -5,7 +5,7 @@ list($features) = explode("(", $version);
$fdb_rrd_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/fdb_count.rrd";
$FdbAddressCount = snmp_get ($device, "hpSwitchFdbAddressCount.0", "-Ovqn", "STATISTICS-MIB", $config['mib_dir'].":".$config['mib_dir']."/hp");
$FdbAddressCount = snmp_get ($device, "hpSwitchFdbAddressCount.0", "-Ovqn", "STATISTICS-MIB");
if(is_numeric($FdbAddressCount))
{
+2 -2
View File
@@ -6,10 +6,10 @@ if($sysDescr == "Neyland 24T") {
$hardware = "Dell ".snmp_get($device, "productIdentificationDisplayName.0", "-Ovq", "Dell-Vendor-MIB");
$version = snmp_get($device, "productIdentificationVersion.0", "-Ovq", "Dell-Vendor-MIB");
} else {
$version = snmp_get($device, "rndBrgVersion.0", "-Ovq", "RADLAN-MIB", $config['mib_dir'].":".$config['mib_dir'] . "radlan/");
$version = snmp_get($device, "rndBrgVersion.0", "-Ovq", "RADLAN-MIB");
$hardware = str_replace("ATI", "Allied Telesis", $sysDescr);
}
$features = snmp_get($device, "rndBaseBootVersion.00", "-Ovq", "RADLAN-MIB", $config['mib_dir'].":".$config['mib_dir'] . "radlan/");
$features = snmp_get($device, "rndBaseBootVersion.00", "-Ovq", "RADLAN-MIB");
$version = str_replace("\"","", $version);
$features = str_replace("\"","", $features);
+22
View File
@@ -5,6 +5,28 @@ function formatMac($mac) {
return $mac;
}
function rewrite_entity_descr ($descr) {
$descr = str_replace("Distributed Forwarding Card", "DFC", $descr);
$descr = preg_replace("/7600 Series SPA Interface Processor-/", "7600 SIP-", $descr);
$descr = preg_replace("/Rev\.\ [0-9\.]+\ /", "", $descr);
$descr = preg_replace("/12000 Series Performance Route Processor/", "12000 PRP", $descr);
$descr = preg_replace("/^12000/", "", $descr);
$descr = preg_replace("/Gigabit Ethernet/", "GigE", $descr);
$descr = preg_replace("/^ASR1000\ /", "", $descr);
$descr = str_replace("Routing Processor", "RP", $descr);
$descr = str_replace("Route Processor", "RP", $descr);
$descr = str_replace("Switching Processor", "SP", $descr);
$descr = str_replace("Sub-Module", "Module ", $descr);
$descr = str_replace("DFC Card", "DFC", $descr);
$descr = str_replace("Power Supply Module", "PSU ", $descr);
$descr = str_replace("/Voltage Sensor/", "Voltage", $descr);
$descr = preg_replace("/^temperatures /", "", $descr);
$descr = preg_replace("/^voltages /", "", $descr);
return $descr;
}
function ifNameDescr($interface, $device = NULL) {
return ifLabel($interface, $device);