some fixes

git-svn-id: http://www.observium.org/svn/observer/trunk@513 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-11-11 15:56:31 +00:00
parent 0983c2f94a
commit 070af9f831
6 changed files with 12 additions and 17 deletions
-1
View File
@@ -37,7 +37,6 @@ if($device[os] != "Snom") {
foreach($oids[$proto] as $oid){
$oid_ds = truncate($oid, 19, '');
echo("\n$oid");
$rrd_create .= " DS:$oid_ds:COUNTER:600:U:100000000000";
$snmpstring .= " $oid.0";
}
+4 -4
View File
@@ -12,10 +12,10 @@ while ($hrDevice = mysql_fetch_array($query)) {
$this_hrDevice = $hrDevice_array[$device[device_id]][$hrDevice[hrDeviceIndex]];
$update_query = "UPDATE `hrDevice` SET";
$update_query .= ", `hrDeviceStatus` = '".mres($this_hrDevice[hrDeviceStatus])."'";
$update_query .= ", `hrDeviceErrors` = '".mres($this_hrDevice[hrDeviceErrors])."'";
$update_query .= ", `hrProcessorLoad` = '".mres($this_hrDevice[hrProcessorLoad])."'";
$update_query .= " WHERE device_id = '".$device['device_id']."' AND hrDeviceIndex = '".$hrDevice['hrDeviceIndex']."'";
$update_query .= ", `hrDeviceStatus` = '".mres($this_hrDevice['hrDeviceStatus'])."'";
$update_query .= ", `hrDeviceErrors` = '".mres($this_hrDevice['hrDeviceErrors'])."'";
$update_query .= ", `hrProcessorLoad` = '".mres($this_hrDevice['hrProcessorLoad'])."'";
$update_query .= " WHERE hrDevice_id = '".$hrDevice['hrDevice_id']."'";
@mysql_query($update_query); $mysql++; echo(".");
$procrrd = addslashes($config['rrd_dir'] . "/" . $device['hostname'] . "/hrProcessor-" . $hrDevice['hrDeviceIndex'] . ".rrd");
-1
View File
@@ -135,7 +135,6 @@
}
$woo = "$polled:$ifInOctets:$ifOutOctets:$ifInErrors:$ifOutErrors:$ifInUcastPkts:$ifOutUcastPkts:$ifInNUcastPkts:$ifOutNUcastPkts";
echo("\n rrdtool update $rrdfile $woo\n");
$ret = rrdtool_update("$rrdfile", $woo);
/// End Update IF-MIB