- Remove " in sysContact.

- Fix error in ucd-mib polling.


git-svn-id: http://www.observium.org/svn/observer/trunk@1920 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Geert Hauwaerts 2011-03-18 11:37:50 +00:00
parent 5d1e5f9592
commit 5b405190e1
2 changed files with 6 additions and 3 deletions

View File

@ -124,8 +124,10 @@ $mem_rrd_create = " --step 300 \
RRA:MAX:0.5:288:800";
$snmpdata = snmp_get_multi($device, "memTotalSwap.0 memAvailSwap.0 memTotalReal.0 memAvailReal.0 memTotalFree.0 memShared.0 memBuffer.0 memCached.0", "-OQUs", "UCD-SNMP-MIB");
list($memTotalSwap, $memAvailSwap, $memTotalReal, $memAvailReal, $memTotalFree, $memShared, $memBuffer, $memCached) = $snmpdata[0];
foreach (array_keys($snmpdata[0]) as $key) { $$key = $snmpdata[0][$key]; }
if (is_array($snmpdata[0])) {
list($memTotalSwap, $memAvailSwap, $memTotalReal, $memAvailReal, $memTotalFree, $memShared, $memBuffer, $memCached) = $snmpdata[0];
foreach (array_keys($snmpdata[0]) as $key) { $$key = $snmpdata[0][$key]; }
}
## Check to see that the OIDs are actually populated before we make the rrd
if (is_numeric($memTotalReal) && is_numeric($memAvailReal) && is_numeric($memTotalFree))
@ -176,4 +178,4 @@ if (is_numeric($load1) && is_numeric($load5) && is_numeric($load10))
$graphs['ucd_load'] = "TRUE";
}
?>
?>

View File

@ -215,6 +215,7 @@ while ($device = mysql_fetch_assoc($device_query))
echo("Hardware: ".$hardware." Version: ".$version." Features: ".$features."\n");
$sysLocation = str_replace("\"","", $sysLocation);
$sysContact = str_replace("\"","", $sysContact);
include("includes/polling/ipmi.inc.php");
include("includes/polling/temperatures.inc.php");