Resolving Issue #2929

Boost performance decreased after updating to Cacti 1.2.6
This commit is contained in:
cigamit committed 2019-09-19 07:08:52 -05:00
1 parent aedbcbf507
commit ea25a80b1e
3 files changed
+13 -3

No files matched your search

+1
View File
@@ -7,6 +7,7 @@ Cacti CHANGELOG
-issue#2922: Undefined variable 'result' in lib/data_query.php
-issue#2925: Problem with consolidation function after upgade to 1.2.6
-issue#2926: Cacti 1.2.6 failed to update graph
-issue#2929: Boost performance decreased after updating to Cacti 1.2.6
-issue#2930: When working in pipe mode RRDtool appends stderr to stdout causing SVG graphing to break
-issue#2932: Some cases where RRDtool can not generate an image are not captured by Cactis image error logic
-issue#2936: Installer will loop when number of tables exceeds PHP's max_input_vars limit
+6 -2
View File
@@ -585,7 +585,7 @@ function boost_get_arch_table_name() {
AND table_name LIKE 'poller_output_boost_arch_%'");
foreach($tables as $table) {
$rows = db_fetch_cell('SELECT count(*) FROM '.$table['name']);
$rows = db_fetch_cell('SELECT COUNT(local_data_id) FROM ' . $table['name']);
if (is_numeric($rows) && intval($rows) > 0) {
return $table['name'];
}
@@ -600,6 +600,7 @@ function boost_get_arch_table_name() {
function boost_process_poller_output($local_data_id = '', $rrdtool_pipe = '') {
global $config, $database_default, $boost_sock, $boost_timeout, $debug, $get_memory, $memory_used;
static $archive_table = false;
static $warning_issued;
include_once($config['library_path'] . '/rrd.php');
@@ -627,7 +628,10 @@ function boost_process_poller_output($local_data_id = '', $rrdtool_pipe = '') {
} else {
$single_local_data_id = false;
$archive_table = boost_get_arch_table_name();
if ($archive_table === false) {
$archive_table = boost_get_arch_table_name();
}
if ($archive_table === false) {
if ($warning_issued != true) {
cacti_log('NOTE: Failed to determine archive table', false, 'BOOST', POLLER_VERBOSITY_MEDIUM);
+6 -1
View File
@@ -361,6 +361,9 @@ function boost_process_local_data_ids($last_id) {
global $config, $boost_sock, $boost_timeout, $debug, $get_memory, $memory_used;
global $rrdtool_pipe, $rrdtool_read_pipe;
/* cache this call as it takes time */
static $archive_table = false;
include_once($config['library_path'] . '/rrd.php');
/* suppress warnings */
@@ -380,7 +383,9 @@ function boost_process_local_data_ids($last_id) {
$rrd_update_interval = read_config_option('boost_rrd_update_interval');
$data_ids_to_get = read_config_option('boost_rrd_update_max_records_per_select');
$archive_table = boost_get_arch_table_name();
if ($archive_table === false) {
$archive_table = boost_get_arch_table_name();
}
if ($archive_table === FALSE) {
cacti_log('Failed to determine archive table', FALSE, 'BOOST');