Detect Juniper WXOS/JWOS + minor MIB path fix

git-svn-id: http://www.observium.org/svn/observer/trunk@1523 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-07-29 15:45:26 +00:00
parent b7ce88623c
commit 343cdf81d3
3 changed files with 16 additions and 2 deletions

View File

@ -0,0 +1,9 @@
<?php
if(!$os) {
if(strstr($sysObjectId, "1.3.6.1.4.1.8239.1.2.9")) { $os = "junos"; }
}
?>

View File

@ -33,7 +33,7 @@ if ($device['os'] == "junos")
{
echo "\nCaching Oids...";
## FIX ME - needs moved to function
$peer_cmd = $config['snmpwalk'] . " -M ".$config['mibdir'] . " -m BGP4-V2-MIB-JUNIPER -Onq -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'].":".$device['port'];
$peer_cmd = $config['snmpwalk'] . " -M ".$config['mibdir'] . "/junos -m BGP4-V2-MIB-JUNIPER -Onq -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'].":".$device['port'];
$peer_cmd .= " jnxBgpM2PeerStatus.0.ipv6";
foreach (explode("\n",trim(`$peer_cmd`)) as $oid)
{
@ -42,7 +42,7 @@ if ($device['os'] == "junos")
$junos_v6[implode('.',array_slice($peer_id,35))] = implode('.',array_slice($peer_id,18));
}
}
## FIX ME - move to fucntion (and clean up, wtf?)
## FIX ME - move to function (and clean up, wtf?)
$peer_cmd = $config['snmpget'] . " -M ".$config['mibdir'] . ":".$config['mibdir'] . "/junos -m BGP4-V2-MIB-JUNIPER -Ovq -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'].":".$device['port'];
$peer_cmd .= " jnxBgpM2PeerState.0.ipv6." . $junos_v6[$peer_ip];
$peer_cmd .= " jnxBgpM2PeerStatus.0.ipv6." . $junos_v6[$peer_ip]; # Should be jnxBgpM2CfgPeerAdminStatus but doesn't seem to be implemented?

View File

@ -133,6 +133,11 @@ $os = "junos";
$config['os'][$os]['text'] = "Juniper JunOS";
$config['os'][$os]['type'] = "network";
$os = "jwos";
$config['os'][$os]['text'] = "Juniper JWOS";
$config['os'][$os]['type'] = "network";
$config['os'][$os]['icon'] = "junos";
$os = "screenos";
$config['os'][$os]['text'] = "Juniper ScreenOS";
$config['os'][$os]['type'] = "firewall";