cacti_log('ERROR: Suggested value column error. Column ' . $sv['field_name'] . ' for Data Template ID ' . $data_local['data_template_id'] . ' is not a compatible field name for tables data_template_data and data_template_rrd. Please correct this suggested value mapping', false);
}
/* once we find a working value for that very field, stop */
returndb_fetch_assoc('SELECT data_template_data.local_data_id, data_source_path FROM data_template_data LEFT JOIN poller_item ON poller_item.local_data_id = data_template_data.local_data_id WHERE poller_item.local_data_id IS NOT NULL AND data_template_data.local_data_id != 0');
@@ -810,6 +810,7 @@ function utilities_get_mysql_recommendations() {
// MySQL/MariaDB Important Variables
// Assume we are successfully, until we aren't!
$result = DB_STATUS_SUCCESS;
$variables = array_rekey(db_fetch_assoc('SHOW GLOBAL VARIABLES'), 'Variable_name', 'Value');
$memInfo = utilities_get_system_memory();
@@ -832,20 +833,21 @@ function utilities_get_mysql_recommendations() {
$recommendations = array(
'version' => array(
'value' => '5.6',
'class' => 'warning',
'measure' => 'ge',
'comment' => __('MySQL 5.6+ and MariaDB 10.0+ are great releases, and are very good versions to choose. Make sure you run the very latest release though which fixes a long standing low level networking issue that was causing spine many issues with reliability.')
)
);
if (isset($variables['innodb_version']) && version_compare($variables['innodb_version'], '5.6', '<')) {
if (version_compare($link_ver, '5.2', '>=')) {
if (version_compare($link_ver, '5.5', '>=')) {
if (!isset($variables['innodb_version'])) {
$recommendations += array(
'innodb' => array(
'value' => 'ON',
'class' => 'warning',
'measure' => 'equal',
'comment' => __('It is recommended that you enable InnoDB in any %s version greater than 5.1.', $database)
'measure' => 'equalint',
'comment' => __('It is STRONGLY recommended that you enable InnoDB in any %s version greater than 5.5.3.', $database)
)
);
@@ -855,13 +857,13 @@ function utilities_get_mysql_recommendations() {
$recommendations += array(
'collation_server' => array(
'value' => 'utf8_general_ci',
'value' => 'utf8mb4_unicode_ci',
'class' => 'warning',
'measure' => 'equal',
'comment' => __('When using Cacti with languages other than English, it is important to use the utf8_general_ci collation type as some characters take more than a single byte. If you are first just now installing Cacti, stop, make the changes and start over again. If your Cacti has been running and is in production, see the internet for instructions on converting your databases and tables if you plan on supporting other languages.')
),
'character_set_client' => array(
'value' => 'utf8',
'value' => 'utf8mb4',
'class' => 'warning',
'measure' => 'equal',
'comment' => __('When using Cacti with languages other than English, it is important to use the utf8 character set as some characters take more than a single byte. If you are first just now installing Cacti, stop, make the changes and start over again. If your Cacti has been running and is in production, see the internet for instructions on converting your databases and tables if you plan on supporting other languages.')
@@ -874,7 +876,7 @@ function utilities_get_mysql_recommendations() {
'innodb' => array(
'value' => 'ON',
'class' => 'warning',
'measure' => 'equal',
'measure' => 'equalint',
'comment' => __('It is recommended that you enable InnoDB in any %s version greater than 5.1.', $database)
)
);
@@ -934,14 +936,21 @@ function utilities_get_mysql_recommendations() {
),
'innodb_file_per_table' => array(
'value' => 'ON',
'measure' => 'equal',
'measure' => 'equalint',
'comment' => __('When using InnoDB storage it is important to keep your table spaces separate. This makes managing the tables simpler for long time users of %s. If you are running with this currently off, you can migrate to the per file storage by enabling the feature, and then running an alter statement on all InnoDB tables.', $database)
),
'innodb_file_format' => array(
'value' => 'Barracuda',
'measure' => 'equal',
'class' => 'error',
'comment' => __('When using innodb_file_per_table, it is important to set the innodb_file_format to Barracuda. This setting will allow longer indexes important for certain Cacti tables.')
),
'innodb_large_prefix' => array(
'value' => '1',
'measure' => 'equalint',
'class' => 'error',
'comment' => __('If your tables have very large indexes, you must operate with the Barracuda innodb_file_format and the innodb_large_prefix equal to 1. Failure to do this may result in plugins that can not properly create tables.')
),
'innodb_buffer_pool_size' => array(
'value' => '25',
'measure' => 'pmem',
@@ -950,7 +959,7 @@ function utilities_get_mysql_recommendations() {
),
'innodb_doublewrite' => array(
'value' => 'OFF',
'measure' => 'equal',
'measure' => 'equalint',
'class' => 'warning',
'comment' => __('With modern SSD type storage, this operation actually degrades the disk more rapidly and adds a 50%% overhead on all write operations.')
),
@@ -963,6 +972,11 @@ function utilities_get_mysql_recommendations() {
'value' => '50',
'measure' => 'ge',
'comment' => __('Rogue queries should not for the database to go offline to others. Kill these queries before they kill your system.')
),
'innodb_flush_method' => array(
'value' => 'O_DIRECT',
'measure' => 'eq',
'comment' => __('Maximum I/O performance happens when you use the O_DIRECT method to flush pages.')
)
);
@@ -1002,6 +1016,24 @@ function utilities_get_mysql_recommendations() {
'measure' => 'pinst',
'class' => 'warning',
'comment' => __('%s will divide the innodb_buffer_pool into memory regions to improve performance. The max value is 64. When your innodb_buffer_pool is less than 1GB, you should use the pool size divided by 128MB. Continue to use this equation upto the max of 64.', $database)
),
'innodb_io_capacity' => array(
'value' => '5000',
'measure' => 'ge',
'class' => 'warning',
'comment' => __('If you have SSD disks, use this suggestion. If you have physical hard drives, use 200 * the number of active drives in the array. If using NVMe or PCIe Flash, much larger numbers as high as 100000 can be used.')
),
'innodb_io_capacity_max' => array(
'value' => '10000',
'measure' => 'ge',
'class' => 'warning',
'comment' => __('If you have SSD disks, use this suggestion. If you have physical hard drives, use 2000 * the number of active drives in the array. If using NVMe or PCIe Flash, much larger numbers as high as 200000 can be used.')
),
'innodb_flush_neighbor_pages' => array(
'value' => 'none',
'measure' => 'eq',
'class' => 'warning',
'comment' => __('If you have SSD disks, use this suggestion. Otherwise, do not set this setting.')
)
);
@@ -1034,13 +1066,13 @@ function utilities_get_mysql_recommendations() {