kill a whole bunch of trailing spaces

git-svn-id: http://www.observium.org/svn/observer/trunk@2516 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-09-20 09:55:11 +00:00
parent 9b270dd1e5
commit d864ce234f
103 changed files with 326 additions and 331 deletions

View File

@@ -8,7 +8,7 @@ if ($debug) { print_r($cefs); }
if (is_array($cefs))
{
if (!is_array($entity_array))
if (!is_array($entity_array))
{
echo("Caching OIDs: ");
$entity_array = array();
@@ -31,10 +31,10 @@ if (is_array($cefs))
echo(" | |-".$path.": ".$path_name['cefSwitchingPath']."\n");
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `cef` WHERE `device_id` = '".$device['device_id']."' AND `entPhysicalIndex` = '".$entity."'
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `cef` WHERE `device_id` = '".$device['device_id']."' AND `entPhysicalIndex` = '".$entity."'
AND `afi` = '".$afi."' AND `cef_index` = '".$path."'"),0) != "1")
{
$sql = "INSERT INTO `cef` (`device_id`, `entPhysicalIndex`, `afi`, `cef_index`, `cef_path`)
$sql = "INSERT INTO `cef` (`device_id`, `entPhysicalIndex`, `afi`, `cef_index`, `cef_path`)
VALUES ('".$device['device_id']."', '".$entity."', '".$afi."', '".$path."', '".$path_name['cefSwitchingPath']."')";
mysql_query($sql);
echo("+");

View File

@@ -124,7 +124,7 @@ function discover_sensor(&$valid, $class, $device, $oid, $index, $type, $descr,
if (!$low_limit) { $low_limit = sensor_low_limit($class, $current); }
$insert = array('poller_type' => $poller_type, 'sensor_class' => $class, 'device_id' => $device['device_id'], 'sensor_oid' => $oid, 'sensor_index' => $index, 'sensor_type' => $type, 'sensor_descr' => $descr,
'sensor_divisor' => $divisor, 'sensor_multiplier' => $multiplier, 'sensor_limit' => $high_limit, 'sensor_limit_warn' => $warn_limit, 'sensor_limit_low' => $low_limit,
'sensor_divisor' => $divisor, 'sensor_multiplier' => $multiplier, 'sensor_limit' => $high_limit, 'sensor_limit_warn' => $warn_limit, 'sensor_limit_low' => $low_limit,
'sensor_limit_low_warn' => $low_warn_limit, 'sensor_current' => $current, 'entPhysicalIndex' => $entPhysicalIndex, 'entPhysicalIndex_measured' => $entPhysicalIndex_measured );
$inserted = dbInsert($insert, 'sensors');
@@ -300,7 +300,7 @@ function discover_link($local_interface_id, $protocol, $remote_interface_id, $re
{
global $config, $debug, $link_exists;
if (dbFetchCell("SELECT COUNT(*) FROM `links` WHERE `remote_hostname` = ? AND `local_interface_id` = ? AND `protocol` = ? AND `remote_port` = ?",
if (dbFetchCell("SELECT COUNT(*) FROM `links` WHERE `remote_hostname` = ? AND `local_interface_id` = ? AND `protocol` = ? AND `remote_port` = ?",
array($remote_hostname, $local_interface_id, $protocol, $remote_port)) == "0")
{
@@ -335,7 +335,7 @@ function discover_storage(&$valid, $device, $index, $type, $mib, $descr, $size,
$storage = dbFetchRow("SELECT * FROM `storage` WHERE `storage_index` = ? AND `device_id` = ? AND `storage_mib` = ?", array($index, $device['device_id'], $mib));
if ($storage === FALSE || !count($storage))
{
$insert = dbInsert(array('device_id' => $device['device_id'], 'storage_descr' => $descr, 'storage_index' => $index, 'storage_mib' => $mib, 'storage_type' => $type,
$insert = dbInsert(array('device_id' => $device['device_id'], 'storage_descr' => $descr, 'storage_index' => $index, 'storage_mib' => $mib, 'storage_type' => $type,
'storage_units' => $units, 'storage_size' => $size, 'storage_used' => $used), 'storage');
if ($debug) { mysql_error(); }
echo("+");

View File

@@ -5,7 +5,7 @@ if ($device['os'] == 'netbotz')
$oids = snmp_walk($device, ".1.3.6.1.4.1.5528.100.4.1.2.1.4", "-Osqn", "");
if ($debug) { echo($oids."\n"); }
$oids = trim($oids);
if ($oids)
if ($oids)
{
echo("Netbotz ");
foreach (explode("\n", $oids) as $data)

View File

@@ -22,7 +22,7 @@ if ($config['enable_libvirt'] == '1' && $device['os'] == "linux" )
{
$uri = $method.'://' . $device['hostname'];
}
if (strstr($method,'ssh') && !$ssh_ok)
{
# Check if we are using SSH if we can log in without password - without blocking the discovery
@@ -31,7 +31,7 @@ if ($config['enable_libvirt'] == '1' && $device['os'] == "linux" )
if ($ret != 255) { $ssh_ok = 1; }
}
if ($ssh_ok || !strstr($method,'ssh'))
if ($ssh_ok || !strstr($method,'ssh'))
{
# Fetch virtual machine list
unset($domlist);
@@ -107,7 +107,7 @@ if ($config['enable_libvirt'] == '1' && $device['os'] == "linux" )
}
}
}
# If we found VMs, don't cycle the other protocols anymore.
if (count($libvirt_vmlist)) { break; }
}

View File

@@ -22,7 +22,7 @@ if ($device['os'] == "netbotz")
{
discover_sensor($valid['sensor'], 'temperature', $device, $temperature_oid, $temperature_id, 'netbotz', $descr, '1', '1', NULL, NULL, NULL, NULL, $temperature);
}
}
}
}
}