mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
9
includes/discovery/os/jwos.inc.php
Executable file
9
includes/discovery/os/jwos.inc.php
Executable file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
if(!$os) {
|
||||
|
||||
if(strstr($sysObjectId, "1.3.6.1.4.1.8239.1.2.9")) { $os = "junos"; }
|
||||
|
||||
}
|
||||
|
||||
?>
|
@ -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?
|
||||
|
@ -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";
|
||||
|
Reference in New Issue
Block a user