diff --git a/includes/polling/unix-agent/hddtemp.inc.php b/includes/polling/unix-agent/hddtemp.inc.php index b7961e01c0..fb186fbc8d 100644 --- a/includes/polling/unix-agent/hddtemp.inc.php +++ b/includes/polling/unix-agent/hddtemp.inc.php @@ -12,7 +12,7 @@ if (isset($agent_data['hddtemp']) && $agent_data['hddtemp'] != '|') { $diskcount++; $temperature = trim(str_replace('C', '', $temperature)); discover_sensor($valid['sensor'], 'temperature', $device, '', $diskcount, 'hddtemp', "$blockdevice: $descr", '1', '1', null, null, null, null, $temperature, 'agent'); - dbUpdate(array('sensor_current' => $temperature), 'sensors', '`sensor_index` = ?, `sensor_class` = ?, `poller_type` = ?, `device_id` = ?', array($diskcount, 'temperature', 'agent', $device['device_id'])); + dbUpdate(array('sensor_current' => $temperature), 'sensors', '`sensor_index` = ? AND `sensor_class` = ? AND `poller_type` = ? AND `device_id` = ?', array($diskcount, 'temperature', 'agent', $device['device_id'])); $tmp_agent_sensors = dbFetchRow("SELECT * FROM `sensors` WHERE `sensor_index` = ? AND `device_id` = ? AND `sensor_class` = 'temperature' AND `poller_type` = 'agent' AND `sensor_deleted` = 0 LIMIT 1", array($diskcount, $device['device_id'])); $tmp_agent_sensors['new_value'] = $temperature; $agent_sensors[] = $tmp_agent_sensors;