os_group ios -> cisco

git-svn-id: http://www.observium.org/svn/observer/trunk@2815 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2012-01-12 11:16:38 +00:00
parent b15ac997f8
commit bf09e5844f
16 changed files with 36 additions and 36 deletions

View File

@@ -80,10 +80,10 @@ if ($config['enable_bgp'])
echo("."); echo(".");
} }
if ($device['os_group'] == "ios" || $device['os'] == "junos") if ($device['os_group'] == "cisco" || $device['os'] == "junos")
{ {
if ($device['os_group'] == "ios") if ($device['os_group'] == "cisco")
{ {
## Get afi/safi and populate cbgp on cisco ios (xe/xr) ## Get afi/safi and populate cbgp on cisco ios (xe/xr)
unset($af_list); unset($af_list);
@@ -106,7 +106,7 @@ if ($config['enable_bgp'])
} }
} }
} }
} # os=ios } # os_group=cisco
if ($device['os'] == "junos") if ($device['os'] == "junos")
{ {
@@ -168,7 +168,7 @@ if ($config['enable_bgp'])
mysql_query("DELETE FROM `bgpPeers_cbgp` WHERE `device_id` = '".$device['device_id']."' AND bgpPeerIdentifier = '".$peer['ip']."' AND afi = '$afi' AND safi = '$safi'"); mysql_query("DELETE FROM `bgpPeers_cbgp` WHERE `device_id` = '".$device['device_id']."' AND bgpPeerIdentifier = '".$peer['ip']."' AND afi = '$afi' AND safi = '$safi'");
} }
} # AF list } # AF list
} # os=ios|junos } # os=cisco|junos
} # Foreach } # Foreach
unset($j_afisafi); unset($j_afisafi);
@@ -206,4 +206,4 @@ if ($config['enable_bgp'])
echo("\n"); echo("\n");
} }
?> ?>

View File

@@ -1,6 +1,6 @@
<?php <?php
if ($device['os'] == "ios" || $device['os_group'] == "ios") if ($device['os_group'] == "cisco")
{ {
echo(" CISCO-ENTITY-SENSOR: "); echo(" CISCO-ENTITY-SENSOR: ");

View File

@@ -1,6 +1,6 @@
<?php <?php
if ($device['os_group'] == "ios") if ($device['os_group'] == "cisco")
{ {
echo("Cisco MAC Accounting : "); echo("Cisco MAC Accounting : ");
@@ -43,7 +43,7 @@ if ($device['os_group'] == "ios")
} }
} }
echo("\n"); echo("\n");
} # os_group=ios } # os_group=cisco
// FIXME - NEEDS TO REMOVE STALE ENTRIES?? :O // FIXME - NEEDS TO REMOVE STALE ENTRIES?? :O
?> ?>

View File

@@ -1,6 +1,6 @@
<?php <?php
if ($config['enable_pseudowires'] && $device['os_group'] == "ios") if ($config['enable_pseudowires'] && $device['os_group'] == "cisco")
{ {
unset($cpw_count); unset($cpw_count);
unset($cpw_exists); unset($cpw_exists);
@@ -74,6 +74,6 @@ if ($config['enable_pseudowires'] && $device['os_group'] == "ios")
echo("\n"); echo("\n");
} # enable_pseudowires + os_group=ios } # enable_pseudowires + os_group=cisco
?> ?>

View File

@@ -1,6 +1,6 @@
<?php <?php
if ($device['os_group'] == "ios") if ($device['os_group'] == "cisco")
{ {
echo("Cisco VLANs : "); echo("Cisco VLANs : ");

View File

@@ -2,7 +2,7 @@
if ($config['enable_vrfs']) if ($config['enable_vrfs'])
{ {
if ($device['os_group'] == "ios" || $device['os_group'] == "junos" || $device['os'] == "ironware") if ($device['os_group'] == "cisco" || $device['os_group'] == "junos" || $device['os'] == "ironware")
{ {
unset($vrf_count); unset($vrf_count);
@@ -101,7 +101,7 @@ if ($config['enable_vrfs'])
unset($valid_vrf); unset($valid_vrf);
echo("\n"); echo("\n");
} # ios/junos/ironware } # cisco/junos/ironware
} # enable_vrfs } # enable_vrfs
?> ?>

View File

@@ -1,6 +1,6 @@
<?php <?php
if ($device['os'] == "ios" || $device['os_group'] == "ios") if ($device['os_group'] == "cisco")
{ {
echo("CISCO-ENHANCED-MEMORY-POOL: "); echo("CISCO-ENHANCED-MEMORY-POOL: ");

View File

@@ -4,7 +4,7 @@
$cemp_count = mysql_result(mysql_query("SELECT COUNT(*) FROM `mempools` WHERE `device_id` = '".$device['device_id']."' AND `mempool_type` = 'cemp'"),0); $cemp_count = mysql_result(mysql_query("SELECT COUNT(*) FROM `mempools` WHERE `device_id` = '".$device['device_id']."' AND `mempool_type` = 'cemp'"),0);
if (($device['os'] == "ios" || $device['os_group'] == "ios") && $cemp_count == "0") if (($device['os_group'] == "cisco") && $cemp_count == "0")
{ {
echo("OLD-CISCO-MEMORY-POOL: "); echo("OLD-CISCO-MEMORY-POOL: ");

View File

@@ -1,6 +1,6 @@
<?php <?php
if ($device['os'] == "ios" || $device['os_group'] == "ios") if ($device['os_group'] == "cisco")
{ {
echo("CISCO-PROCESS-MIB : "); echo("CISCO-PROCESS-MIB : ");
$processors_array = snmpwalk_cache_oid($device, "cpmCPU", NULL, "CISCO-PROCESS-MIB"); $processors_array = snmpwalk_cache_oid($device, "cpmCPU", NULL, "CISCO-PROCESS-MIB");

View File

@@ -1,6 +1,6 @@
<?php <?php
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `sensors` WHERE `device_id` = '".$device['device_id']."' AND `sensor_class` = 'temperature' AND (`sensor_type` = 'cisco-entity-sensor' OR `sensor_type` = 'entity-sensor')"),0) == "0" && ($device['os'] == "ios" || $device['os_group'] == "ios")) if (mysql_result(mysql_query("SELECT COUNT(*) FROM `sensors` WHERE `device_id` = '".$device['device_id']."' AND `sensor_class` = 'temperature' AND (`sensor_type` = 'cisco-entity-sensor' OR `sensor_type` = 'entity-sensor')"),0) == "0" && ($device['os_group'] == "cisco"))
{ {
echo("Cisco "); echo("Cisco ");
$oids = snmp_walk($device, ".1.3.6.1.4.1.9.9.13.1.3.1.2", "-Osqn", "CISCO-ENVMON-MIB"); $oids = snmp_walk($device, ".1.3.6.1.4.1.9.9.13.1.3.1.2", "-Osqn", "CISCO-ENVMON-MIB");

View File

@@ -134,7 +134,7 @@ else
dbUpdate($peer['update'], 'bgpPeers', '`device_id` = ? AND `bgpPeerIdentifier` = ?', array($device['device_id'], $peer['bgpPeerIdentifier'])); dbUpdate($peer['update'], 'bgpPeers', '`device_id` = ? AND `bgpPeerIdentifier` = ?', array($device['device_id'], $peer['bgpPeerIdentifier']));
if ($device['os_group'] == "ios" || $device['os'] == "junos") if ($device['os_group'] == "cisco" || $device['os'] == "junos")
{ {
## Poll each AFI/SAFI for this peer (using CISCO-BGP4-MIB or BGP4-V2-JUNIPER MIB) ## Poll each AFI/SAFI for this peer (using CISCO-BGP4-MIB or BGP4-V2-JUNIPER MIB)
$peer_afis = dbFetchRows("SELECT * FROM bgpPeers_cbgp WHERE `device_id` = ? AND bgpPeerIdentifier = ?", array($device['device_id'], $peer['bgpPeerIdentifier'])); $peer_afis = dbFetchRows("SELECT * FROM bgpPeers_cbgp WHERE `device_id` = ? AND bgpPeerIdentifier = ?", array($device['device_id'], $peer['bgpPeerIdentifier']));
@@ -144,7 +144,7 @@ else
$safi = $peer_afi['safi']; $safi = $peer_afi['safi'];
if ($debug) { echo("$afi $safi\n"); } if ($debug) { echo("$afi $safi\n"); }
if ($device['os_group'] == "ios") if ($device['os_group'] == "cisco")
{ {
## FIXME - move to function ## FIXME - move to function
$cbgp_cmd = $config['snmpget'] . " -M ".$config['mibdir'] . " -m CISCO-BGP4-MIB -Ovq -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'].":".$device['port']; $cbgp_cmd = $config['snmpget'] . " -M ".$config['mibdir'] . " -m CISCO-BGP4-MIB -Ovq -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'].":".$device['port'];
@@ -238,7 +238,7 @@ else
} }
rrdtool_update("$cbgp_rrd", "N:$cbgpPeerAcceptedPrefixes:$cbgpPeerDeniedPrefixes:$cbgpPeerAdvertisedPrefixes:$cbgpPeerSuppressedPrefixes:$cbgpPeerWithdrawnPrefixes"); rrdtool_update("$cbgp_rrd", "N:$cbgpPeerAcceptedPrefixes:$cbgpPeerDeniedPrefixes:$cbgpPeerAdvertisedPrefixes:$cbgpPeerSuppressedPrefixes:$cbgpPeerWithdrawnPrefixes");
} # while } # while
} # os=ios | junos } # os_group=cisco | junos
echo("\n"); echo("\n");
} ## End While loop on peers } ## End While loop on peers

View File

@@ -32,7 +32,7 @@
#CISCO-IPSEC-FLOW-MONITOR-MIB::cipSecGlobalNoSaFails.0 = Counter32: 5 Failures #CISCO-IPSEC-FLOW-MONITOR-MIB::cipSecGlobalNoSaFails.0 = Counter32: 5 Failures
#CISCO-IPSEC-FLOW-MONITOR-MIB::cipSecGlobalSysCapFails.0 = Counter32: 0 Failures #CISCO-IPSEC-FLOW-MONITOR-MIB::cipSecGlobalSysCapFails.0 = Counter32: 0 Failures
if ($device['os_group'] == "ios") if ($device['os_group'] == "cisco")
{ {
$data = snmpwalk_cache_oid($device, "cipSecGlobalStats", NULL, "CISCO-IPSEC-FLOW-MONITOR-MIB"); $data = snmpwalk_cache_oid($device, "cipSecGlobalStats", NULL, "CISCO-IPSEC-FLOW-MONITOR-MIB");
$data = $data[0]; $data = $data[0];

View File

@@ -31,7 +31,7 @@
#CISCO-REMOTE-ACCESS-MONITOR-MIB::crasWebvpnCumulateSessions.0 = Counter32: 29 Sessions #CISCO-REMOTE-ACCESS-MONITOR-MIB::crasWebvpnCumulateSessions.0 = Counter32: 29 Sessions
#CISCO-REMOTE-ACCESS-MONITOR-MIB::crasWebvpnPeakConcurrentSessions.0 = Gauge32: 9 Sessions #CISCO-REMOTE-ACCESS-MONITOR-MIB::crasWebvpnPeakConcurrentSessions.0 = Gauge32: 9 Sessions
if ($device['os_group'] == "ios") if ($device['os_group'] == "cisco")
{ {
$oid_list = "crasEmailNumSessions.0 crasIPSecNumSessions.0 crasL2LNumSessions.0 crasLBNumSessions.0 crasSVCNumSessions.0 crasWebvpnNumSessions.0"; $oid_list = "crasEmailNumSessions.0 crasIPSecNumSessions.0 crasL2LNumSessions.0 crasLBNumSessions.0 crasSVCNumSessions.0 crasWebvpnNumSessions.0";
$data = snmp_get_multi($device, $oid_list, "-OUQs", "CISCO-REMOTE-ACCESS-MONITOR-MIB"); $data = snmp_get_multi($device, $oid_list, "-OUQs", "CISCO-REMOTE-ACCESS-MONITOR-MIB");
@@ -85,4 +85,4 @@ if ($device['os_group'] == "ios")
unset($data, $$rrd_filename, $rrd_create, $rrd_update); unset($data, $$rrd_filename, $rrd_create, $rrd_update);
} }
?> ?>

View File

@@ -8,7 +8,7 @@
#CISCO-VPDN-MGMT-MIB::cvpdnSystemDeniedUsersTotal.l2tp = Counter32: 0 attempts #CISCO-VPDN-MGMT-MIB::cvpdnSystemDeniedUsersTotal.l2tp = Counter32: 0 attempts
#CISCO-VPDN-MGMT-MIB::cvpdnSystemClearSessions.0 = INTEGER: none(1) #CISCO-VPDN-MGMT-MIB::cvpdnSystemClearSessions.0 = INTEGER: none(1)
if ($device['os_group'] == "ios") if ($device['os_group'] == "cisco")
{ {
$data = snmpwalk_cache_oid($device, "cvpdnSystemEntry", NULL, "CISCO-VPDN-MGMT-MIB"); $data = snmpwalk_cache_oid($device, "cvpdnSystemEntry", NULL, "CISCO-VPDN-MGMT-MIB");

View File

@@ -76,7 +76,7 @@ if ($device['adsl_count'] > "0")
#foreach ($cisco_oids as $oid) { $port_stats = snmpwalk_cache_oid($device, $oid, $port_stats, "OLD-CISCO-INTERFACES-MIB"); } #foreach ($cisco_oids as $oid) { $port_stats = snmpwalk_cache_oid($device, $oid, $port_stats, "OLD-CISCO-INTERFACES-MIB"); }
#foreach ($pagp_oids as $oid) { $port_stats = snmpwalk_cache_oid($device, $oid, $port_stats, "CISCO-PAGP-MIB"); } #foreach ($pagp_oids as $oid) { $port_stats = snmpwalk_cache_oid($device, $oid, $port_stats, "CISCO-PAGP-MIB"); }
if ($device['os_group'] == "ios") if ($device['os_group'] == "cisco")
{ {
$port_stats = snmp_cache_portIfIndex ($device, $port_stats); $port_stats = snmp_cache_portIfIndex ($device, $port_stats);
$port_stats = snmp_cache_portName ($device, $port_stats); $port_stats = snmp_cache_portName ($device, $port_stats);

View File

@@ -149,7 +149,7 @@ $config['os'][$os]['icon'] = "alcatellucent";
## Cisco OSes ## Cisco OSes
$os = "ios"; $os = "ios";
$config['os'][$os]['group'] = "ios"; $config['os'][$os]['group'] = "cisco";
$config['os'][$os]['text'] = "Cisco IOS"; $config['os'][$os]['text'] = "Cisco IOS";
$config['os'][$os]['type'] = "network"; $config['os'][$os]['type'] = "network";
$config['os'][$os]['ifXmcbc'] = 1; $config['os'][$os]['ifXmcbc'] = 1;
@@ -162,8 +162,8 @@ $config['os'][$os]['over'][2]['text'] = "Memory Usage";
$config['os'][$os]['icon'] = "cisco"; $config['os'][$os]['icon'] = "cisco";
$os = "acsw"; $os = "acsw";
$config['os'][$os]['group'] = "ios"; $config['os'][$os]['group'] = "cisco";
$config['os'][$os]['text'] = "Cisco Application Control Software"; $config['os'][$os]['text'] = "Cisco ACE";
$config['os'][$os]['ifname'] = 1; $config['os'][$os]['ifname'] = 1;
$config['os'][$os]['type'] = "network"; $config['os'][$os]['type'] = "network";
$config['os'][$os]['icon'] = "cisco"; $config['os'][$os]['icon'] = "cisco";
@@ -187,7 +187,7 @@ $config['os'][$os]['over'][2]['graph'] = "device_mempool";
$config['os'][$os]['over'][2]['text'] = "Memory Usage"; $config['os'][$os]['over'][2]['text'] = "Memory Usage";
$os = "iosxe"; $os = "iosxe";
$config['os'][$os]['group'] = "ios"; $config['os'][$os]['group'] = "cisco";
$config['os'][$os]['text'] = "Cisco IOS-XE"; $config['os'][$os]['text'] = "Cisco IOS-XE";
$config['os'][$os]['type'] = "network"; $config['os'][$os]['type'] = "network";
$config['os'][$os]['ifXmcbc'] = 1; $config['os'][$os]['ifXmcbc'] = 1;
@@ -200,7 +200,7 @@ $config['os'][$os]['over'][2]['text'] = "Memory Usage";
$config['os'][$os]['icon'] = "cisco"; $config['os'][$os]['icon'] = "cisco";
$os = "iosxr"; $os = "iosxr";
$config['os'][$os]['group'] = "ios"; $config['os'][$os]['group'] = "cisco";
$config['os'][$os]['text'] = "Cisco IOS-XR"; $config['os'][$os]['text'] = "Cisco IOS-XR";
$config['os'][$os]['type'] = "network"; $config['os'][$os]['type'] = "network";
$config['os'][$os]['ifXmcbc'] = 1; $config['os'][$os]['ifXmcbc'] = 1;
@@ -213,7 +213,7 @@ $config['os'][$os]['over'][2]['graph'] = "device_mempool";
$config['os'][$os]['over'][2]['text'] = "Memory Usage"; $config['os'][$os]['over'][2]['text'] = "Memory Usage";
$os = "asa"; $os = "asa";
$config['os'][$os]['group'] = "ios"; $config['os'][$os]['group'] = "cisco";
$config['os'][$os]['text'] = "Cisco ASA"; $config['os'][$os]['text'] = "Cisco ASA";
$config['os'][$os]['ifname'] = 1; $config['os'][$os]['ifname'] = 1;
$config['os'][$os]['type'] = "firewall"; $config['os'][$os]['type'] = "firewall";
@@ -224,7 +224,7 @@ $config['os'][$os]['over'][1]['graph'] = "device_processor";
$config['os'][$os]['over'][1]['text'] = "CPU Usage"; $config['os'][$os]['over'][1]['text'] = "CPU Usage";
$os = "pix"; $os = "pix";
$config['os'][$os]['group'] = "ios"; $config['os'][$os]['group'] = "cisco";
$config['os'][$os]['text'] = "Cisco PIX-OS"; $config['os'][$os]['text'] = "Cisco PIX-OS";
$config['os'][$os]['ifname'] = 1; $config['os'][$os]['ifname'] = 1;
$config['os'][$os]['type'] = "firewall"; $config['os'][$os]['type'] = "firewall";
@@ -237,7 +237,7 @@ $config['os'][$os]['over'][2]['graph'] = "device_mempool";
$config['os'][$os]['over'][2]['text'] = "Memory Usage"; $config['os'][$os]['over'][2]['text'] = "Memory Usage";
$os = "nxos"; $os = "nxos";
$config['os'][$os]['group'] = "ios"; $config['os'][$os]['group'] = "cisco";
$config['os'][$os]['text'] = "Cisco NX-OS"; $config['os'][$os]['text'] = "Cisco NX-OS";
$config['os'][$os]['type'] = "network"; $config['os'][$os]['type'] = "network";
$config['os'][$os]['icon'] = "cisco"; $config['os'][$os]['icon'] = "cisco";
@@ -249,7 +249,7 @@ $config['os'][$os]['over'][2]['graph'] = "device_mempool";
$config['os'][$os]['over'][2]['text'] = "Memory Usage"; $config['os'][$os]['over'][2]['text'] = "Memory Usage";
$os = "sanos"; $os = "sanos";
$config['os'][$os]['group'] = "ios"; $config['os'][$os]['group'] = "cisco";
$config['os'][$os]['text'] = "Cisco SAN-OS"; $config['os'][$os]['text'] = "Cisco SAN-OS";
$config['os'][$os]['type'] = "network"; $config['os'][$os]['type'] = "network";
$config['os'][$os]['icon'] = "cisco"; $config['os'][$os]['icon'] = "cisco";
@@ -261,7 +261,7 @@ $config['os'][$os]['over'][2]['graph'] = "device_mempool";
$config['os'][$os]['over'][2]['text'] = "Memory Usage"; $config['os'][$os]['over'][2]['text'] = "Memory Usage";
$os = "catos"; $os = "catos";
$config['os'][$os]['group'] = "ios"; $config['os'][$os]['group'] = "cisco";
$config['os'][$os]['text'] = "Cisco CatOS"; $config['os'][$os]['text'] = "Cisco CatOS";
$config['os'][$os]['ifname'] = 1; $config['os'][$os]['ifname'] = 1;
$config['os'][$os]['type'] = "network"; $config['os'][$os]['type'] = "network";