syntaxer run

git-svn-id: http://www.observium.org/svn/observer/trunk@3008 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2012-04-09 15:30:45 +00:00
parent 9cea534c1b
commit a10d3f75ea
10 changed files with 64 additions and 63 deletions

View File

@@ -182,6 +182,7 @@ $config['enable_inventory'] = 1; # Enable Inventory
$config['enable_pseudowires'] = 1; # Enable Pseudowires
$config['enable_vrfs'] = 1; # Enable VRFs
$config['enable_printers'] = 0; # Enable Printer support
$config['enable_sla'] = 0; # Enable Cisco SLA collection and display
### Ports extension modules

View File

@@ -7,7 +7,8 @@ if ($config['enable_sla'] && $device['os_group'] == "cisco")
$slas = snmp_walk($device, "ciscoRttMonMIB.ciscoRttMonObjects.rttMonCtrl", "-Osq", "+CISCO-RTTMON-MIB");
$sla_table = array();
foreach (explode("\n", $slas) as $sla) {
foreach (explode("\n", $slas) as $sla)
{
$key_val = explode(" ", $sla, 2);
if (count($key_val) != 2)
$key_val[] = "";
@@ -78,7 +79,7 @@ if ($config['enable_sla'] && $device['os_group'] == "cisco")
}
}
if( !$sla_id )
if (!$sla_id)
{
$sla_id = dbInsert($data, 'slas');
echo "+";

View File

@@ -60,5 +60,4 @@ if (is_numeric($cpu_usage))
#$mem=snmp_get($device, "FORTINET-FORTIGATE-MIB::fgSysMemUsage.0", "-Ovq");
#$memsize=snmp_get($device, "FORTINET-FORTIGATE-MIB::fgSysMemCapacity", "-Ovq");
?>

View File

@@ -446,7 +446,7 @@ foreach ($ports as $port)
elseif ($port['disabled'] != "1")
{
echo("Port Deleted"); ### Port missing from SNMP cache.
if($port['deleted'] != "1")
if ($port['deleted'] != "1")
{
dbUpdate(array('deleted' => '1'), 'ports', '`device_id` = ? AND `ifIndex` = ?', array($device['device_id'], $port['ifIndex']));
}

View File

@@ -14,7 +14,7 @@ function snmp_get_multi($device, $oids, $options = "-OQUs", $mib = NULL, $mibdir
{
global $debug,$config,$runtime_stats,$mibs_loaded;
if(!$options) { $options = "-OQUs"; }
if (!$options) { $options = "-OQUs"; }
if (is_numeric($device['timeout']) && $device['timeout'] > 0)
{