- Reverted 'temperature' database change.

git-svn-id: http://www.observium.org/svn/observer/trunk@1160 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Geert Hauwaerts
2010-06-12 23:46:51 +00:00
parent 7c5432cdf6
commit 06ee8ec7d2
2 changed files with 2 additions and 1 deletions

View File

@ -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;

View File

@ -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')");