diff --git a/database-update.sql b/database-update.sql index 878cbb1bc..115f1d1f1 100644 --- a/database-update.sql +++ b/database-update.sql @@ -88,4 +88,5 @@ ALTER TABLE `temperature` CHANGE `temp_host` `device_id` INT( 11 ) NOT NULL D ALTER TABLE `fanspeed` CHANGE `fan_host` `device_id` INT( 11 ) NOT NULL DEFAULT '0' ALTER TABLE `voltage` CHANGE `volt_host` `device_id` INT( 11 ) NOT NULL DEFAULT '0' CREATE TABLE IF NOT EXISTS `processors` ( `processor_id` int(11) NOT NULL AUTO_INCREMENT, `entPhysicalIndex` int(11) NOT NULL, `device_id` int(11) NOT NULL, `processor_oid` int(11) NOT NULL, `processor_type` int(11) NOT NULL, `processor_usage` int(11) NOT NULL, `processor_description` varchar(64) NOT NULL, PRIMARY KEY (`processor_id`), KEY `cpuCPU_id` (`processor_id`,`device_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -ALTER TABLE `processors` ADD `hrDeviceIndex` int(11) NOT NULL AFTER `entPhysicalIndex` +ALTER TABLE `processors` ADD `hrDeviceIndex` int(11) NULL AFTER `entPhysicalIndex` +ALTER TABLE `temperature` CHANGE `temp_current` `temp_current` FLOAT( 4 ) NOT NULL DEFAULT '0' diff --git a/discovery.php b/discovery.php index 669d3840e..cf824449d 100755 --- a/discovery.php +++ b/discovery.php @@ -4,6 +4,7 @@ include("config.php"); include("includes/functions.php"); include("includes/functions-poller.inc.php"); +include("includes/discovery/functions.inc.php"); $start = utime(); diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php index 25a6273e1..58c4e1ffd 100644 --- a/includes/defaults.inc.php +++ b/includes/defaults.inc.php @@ -68,6 +68,11 @@ $config['allow_entity_sensor']['watts'] = 1; $config['allow_entity_sensor']['truthvalue'] = 1; $config['allow_entity_sensor']['specialEnum'] = 1; +# Set default alert limits for various sensors and metrics + +$config['limit']['fan'] = "1000"; +$config['limit']['temp'] = "60"; + # Filesystems $config['ignore_mount'] = array("/kern", "/mnt/cdrom", "/proc"); @@ -76,6 +81,4 @@ $config['ignore_mount_regexp'] = array(); $config['ignore_mount_removable'] = 1; # Ignore removable disk storage $config['ignore_mount_network'] = 1; # Ignore network mounted storage - - ?> diff --git a/includes/polling/fanspeeds.inc.php b/includes/polling/fanspeeds.inc.php index e76f4af1a..2e2d64ccb 100755 --- a/includes/polling/fanspeeds.inc.php +++ b/includes/polling/fanspeeds.inc.php @@ -14,7 +14,7 @@ while($fanspeed = mysql_fetch_array($fan_data)) { $fanrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("fan-" . $fanspeed['fan_descr'] . ".rrd"); if (!is_file($fanrrd)) { - `rrdtool create $fanrrd \ + `rrdtool create $fanrrd \ --step 300 \ DS:fan:GAUGE:600:0:20000 \ RRA:AVERAGE:0.5:1:1200 \