diff --git a/includes/polling/ucd-mib.inc.php b/includes/polling/ucd-mib.inc.php index b968f72c5..cad8826b9 100755 --- a/includes/polling/ucd-mib.inc.php +++ b/includes/polling/ucd-mib.inc.php @@ -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"; } -?> \ No newline at end of file +?> diff --git a/poller.php b/poller.php index c16b6a2e8..6cbc60ab4 100755 --- a/poller.php +++ b/poller.php @@ -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");