diff --git a/database-update.sql b/database-update.sql index abf621e766..96668554a4 100644 --- a/database-update.sql +++ b/database-update.sql @@ -10,3 +10,4 @@ CREATE TABLE `frequency` ( `freq_id` int(11) NOT NULL auto_increment, `device_id ALTER TABLE `temperature` CHANGE `temp_index` `temp_index` int(11) NOT NULL; CREATE TABLE `current` ( `current_id` int(11) NOT NULL auto_increment, `device_id` int(11) NOT NULL default '0', `current_oid` varchar(64) NOT NULL, `current_index` varchar(8) NOT NULL, `current_type` varchar(32) NOT NULL, `current_descr` varchar(32) NOT NULL default '', `current_precision` int(11) NOT NULL default '1', `current_current` float default NULL, `current_limit` float default NULL, `current_limit_warn` float default NULL, `current_limit_low` float default NULL, PRIMARY KEY (`current_id`), KEY `current_host` (`device_id`)) ENGINE=MyISAM AUTO_INCREMENT=189 DEFAULT CHARSET=latin1; ALTER TABLE `devices` ADD `serial` text default NULL; +ALTER TABLE `temperature` CHANGE `temp_index` `temp_index` VARCHAR(32) NOT NULL; diff --git a/poll-reachability.php b/poll-reachability.php index 14110e9363..0a10438617 100755 --- a/poll-reachability.php +++ b/poll-reachability.php @@ -46,7 +46,7 @@ while ($device = mysql_fetch_array($device_query)) { if ($status == '1') { $stat = "Up"; mysql_query("INSERT INTO alerts (importance, device_id, message) VALUES ('0', '" . $device['device_id'] . "', 'Device is up\n')"); - mail($email, "DeviceUp: " . $device['hostname'], "Device Up: " . $device['hostname'] . " at " . date($config['timestamp_format']), $config['email_headers']); + mail($email, "Device Up: " . $device['hostname'], "Device Up: " . $device['hostname'] . " at " . date($config['timestamp_format']), $config['email_headers']); } else { $stat = "Down"; mysql_query("INSERT INTO alerts (importance, device_id, message) VALUES ('9', '" . $device['device_id'] . "', 'Device is down\n')");