fixes to things, use *only* junos and junose mibdir for those things

git-svn-id: http://www.observium.org/svn/observer/trunk@1586 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-07-31 19:12:40 +00:00
parent 811d3ca6a1
commit ec74c22e3b
14 changed files with 55 additions and 33 deletions

View File

@@ -39,7 +39,7 @@ if ($config['enable_bgp'])
if ($device['os'] == "junos")
{
## Juniper BGP4-V2 MIB, ipv6 only for now, because v4 should be covered in BGP4-MIB above
$peers_cmd = $config['snmpwalk'] . " -M " . $config['mibdir'] . " -M +".$config['install_dir']."/mibs/junos -m BGP4-V2-MIB-JUNIPER -CI -Onq -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'].":".$device['port'] . " ";
$peers_cmd = $config['snmpwalk'] . " -M " . $config['mibdir'] . " -M ".$config['install_dir']."/mibs/junos -m BGP4-V2-MIB-JUNIPER -CI -Onq -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'].":".$device['port'] . " ";
$peers_cmd .= "jnxBgpM2PeerRemoteAs.0.ipv6"; # FIXME: is .0 the only possible value here?
$peers = trim(str_replace(".1.3.6.1.4.1.2636.5.1.1.2.1.1.1.13.0.","", `$peers_cmd`));
foreach (explode("\n", $peers) as $peer)

View File

@@ -8,7 +8,7 @@
if($device['os'] == "junose" && $config['enable_ports_junoseatmvp'])
{
echo("JunOSe ATM vps : ");
$vp_array = snmpwalk_cache_multi_oid($device, "juniAtmVpStatsInCells", $vp_array, "Juniper-UNI-ATM-MIB" , "+".$config['install_dir']."/mibs/junose");
$vp_array = snmpwalk_cache_multi_oid($device, "juniAtmVpStatsInCells", $vp_array, "Juniper-UNI-ATM-MIB" , $config['install_dir']."/mibs/junose");
$valid_vp = array();
if($debug) { print_r($vp_array); }

View File

@@ -6,9 +6,9 @@ global $valid_mempool;
if($device['os'] == "junos")
{
echo("JUNOS : ");
$mempools_array = snmpwalk_cache_multi_oid($device, "jnxOperatingBuffer", $mempools_array, "JUNIPER-MIB" , "+".$config['install_dir']."/mibs/junos");
$mempools_array = snmpwalk_cache_multi_oid($device, "jnxOperatingDRAMSize", $mempools_array, "JUNIPER-MIB" , "+".$config['install_dir']."/mibs/junos");
$mempools_array = snmpwalk_cache_multi_oid($device, "jnxOperatingDescr", $mempools_array, "JUNIPER-MIB" , "+".$config['install_dir']."/mibs/junos");
$mempools_array = snmpwalk_cache_multi_oid($device, "jnxOperatingBuffer", $mempools_array, "JUNIPER-MIB" , $config['install_dir']."/mibs/junos");
$mempools_array = snmpwalk_cache_multi_oid($device, "jnxOperatingDRAMSize", $mempools_array, "JUNIPER-MIB" , $config['install_dir']."/mibs/junos");
$mempools_array = snmpwalk_cache_multi_oid($device, "jnxOperatingDescr", $mempools_array, "JUNIPER-MIB" , $config['install_dir']."/mibs/junos");
if($debug) { print_r($mempools_array); }
if(is_array($mempools_array[$device['device_id']])) {

View File

@@ -6,7 +6,7 @@ global $valid_processor;
if($device['os'] == "junose")
{
echo("JUNOSe : ");
$processors_array = snmpwalk_cache_double_oid($device, "juniSystemModule", $processors_array, "Juniper-System-MIB" , "+".$config['install_dir']."/mibs/junose");
$processors_array = snmpwalk_cache_double_oid($device, "juniSystemModule", $processors_array, "Juniper-System-MIB" , $config['install_dir']."/mibs/junose");
if($debug) { print_r($processors_array); }
foreach ($processors_array[$device['device_id']] as $index => $entry)

View File

@@ -5,7 +5,7 @@ global $valid_sensor;
if ($device['os'] == "junos" || $device['os_group'] == "junos")
{
echo("JunOS ");
$oids = snmp_walk($device,"1.3.6.1.4.1.2636.3.1.13.1.7","-Osqn","JUNIPER-MIB", '+'.$config['install_dir']."/mibs/junos");
$oids = snmp_walk($device,"1.3.6.1.4.1.2636.3.1.13.1.7","-Osqn","JUNIPER-MIB", $config['install_dir']."/mibs/junos");
$oids = trim($oids);
foreach(explode("\n", $oids) as $data)
{

View File

@@ -7,7 +7,7 @@ global $valid_sensor;
if ($device['os'] == "junose")
{
echo("JunOSe: ");
$oids = snmpwalk_cache_multi_oid($device, "juniSystemTempValue", array(), "Juniper-System-MIB", "+".$config['install_dir']."/mibs/junose");
$oids = snmpwalk_cache_multi_oid($device, "juniSystemTempValue", array(), "Juniper-System-MIB", $config['install_dir']."/mibs/junose");
if(is_array($oids[$device['device_id']]))
{
foreach($oids[$device[device_id]] as $index => $entry)