blog

ClusterControl runtime configuration options

Sebastian Insausti

Published:

When you install ClusterControl, it has a default configuration that maybe doesn’t fit your requirements so probably you will need to customize this installation. For this, you can modify the configuration files, but you can also check or modify the runtime ClusterControl settings. In this blog, we will show you where you can see this configuration and what are the available options to use here.

Where can you see the ClusterControl Runtime Configuration?

There are two different ways to check this. First, you can go to ClusterControl -> Global Settings -> Runtime Configurations, then choose your Cluster.

Another way is ClusterControl -> Select Cluster -> Settings -> Runtime Configurations.

In both cases, you will go to the same place, the Runtime Configuration section.

Runtime Configuration Parameters

Now, let’s see these parameters one by one. Keep in mind that these parameters depend on the database technology that you are using, so most probably you won’t see all of them at the same time in the same cluster.

Backup

Name

Default Value

Description

disable_backup_email

false

This setting controls if emails are sent or not if a backup is finished or failed.

backup_user

backupuser

The username of the database account used for managing backups.

backup_create_hash

true

Configures ClusterControl if it has to calculate md5hash on the created backup files and verify them.

pitr_retention_hours

0

Retention hours (to erase old WAL archive logs) for PITR.

netcat_port

9999,9990-9998

List of Netcat ports and port ranges used to stream backups. Defaults to ‘9999,9990-9998’ and port 9999 will be preferred if available.

backupdir

/home/user/backups

The default backup directory, to be pre-filled in Frontend.

backup_subdir

BACKUP-%I

Set the name of the backup subdirectory. This string may hold standard “%X” field separators, the “%06I” for example will be replaced by the numerical ID of the backup in 6 field-wide format that uses ‘0’ as leading fill characters. Here is the list of fields the backend currently supports: – B The date and time when the backup creation was beginning. – H The name of the backup host, the host that created the backup. – i The numerical ID of the cluster. – I The numerical ID of the backup. – J The numerical ID of the job that created the backup. – M The backup method (e.g. “mysqldump”). – O The name of the user who initiated the backup job. – S The name of the storage host, the host that stores the backup files. – % The percent sign itself. Use two percent signs, “%%” the same way the standard printf() function interprets it as one percent sign.

backup_retention

31

The setting of how many days to keep the backups. Backups matching retention period are removed.

backup_cloud_retention

180

The setting of how many days to keep the backups uploaded to a cloud. Backups matching retention period are removed.

backup_n_safety_copies

1

The setting of how many completed full backups will be kept regardless of their retention status.

 

Cluster

Name

Default Value

Description

cluster_name

 

The name of the cluster for easy identification.

enable_node_autorecovery

true

Node auto-recovery setting.

enable_cluster_autorecovery

true

If true, ClusterControl will perform cluster auto-recovery, if false no cluster recovery will be done automatically.

configdir

/etc/

The database server config directory.

created_by_job

 

The ID of the job created this cluster.

ssh_keypath

/home/user/.ssh/id_rsa

The SSH key file used for connection to nodes.

server_selection_try_once

true

MongoDB connection URI option. Defines if server selection should be repeated on failure until a server selection timeout expires, or just return with failure at once.

server_selection_timeout_ms

30000

MongoDB connection URI option. Defines the timeout value till mongodriver should try to do a successful server selection operation.

owner

 

The ClusterControl user ID of the owner of the cluster object.

group_owner

 

The ClusterControl group ID of the group that owns the cluster object.

cdt_path

 

The location of the cluster object in the ClusterControl Directory Tree.

tags

/

A set of strings the user can specify.

acl

 

The Access Control List as a string controlling the access to the cluster object.

mongodb_user

admindb

The MongoDB username.

mongodb_basedir

/usr/

The basedir for MongoDB installation.

mysql_basedir

/usr/

The basedir for MySQL installation.

scriptdir

/usr/bin/

The scripts dir of MySQL installation.

staging_dir

/home/user/s9s_tmp

A staging path for temporary files.

bindir

/usr/bin

The /bin directory of the MySQL installation.

monitored_mysql_port

3306

The monitored MySQL server’s port number.

ndb_connectstring

127.0.0.1:1186

The NDB connect string setting for MySQL Cluster.

ndbd_datadir

 

The datadir of the NDBD nodes.

mgmd_datadir

 

The datadir of the NDB MGMD nodes.

os_user

 

The SSH username used for accessing nodes.

repl_user

cmon_replication

The replication username.

vendor

 

The database vendor name used for deployments.

galera_version

 

The used Galera version number.

server_version

 

The used database server version for deployments.

postgresql_user

admindb

The PostgreSQL user name.

galera_port

4567

The galera port to be used when adding nodes/garbd, and constructing wsrep_cluster_address. Do not change at runtime.

auto_manage_readonly

true

Allow ClusterControl to manage the read-only flag of the managed MySQL servers.

node_recovery_lock_file

 

Specify a lock file and if present on a node, the node will not recover. It is the responsibility of the administrator to create/remove the file.

 

Cmondb

Name

Default Value

Description

cmon_db

cmon

The local ClusterControl database name.

cmondb_hostname

127.0.0.1

The local ClusterControl database MySQL server hostname.

mysql_port

3306

The local ClusterControl database MySQL server port.

cmon_user

cmon

The account name for accessing the local ClusterControl database.

 

Controller

Name

Default Value

Description

controller_id

5a3a993d-xxxx

An arbitrary identifier string of this controller instance.

cmon_hostname

192.168.xx.xx

The controller hostname.

error_report_dir

/home/user/s9s_tmp

Storage location of error reports.

 

Long_query

Name

Default Value

Description

long_query_time

0.5

Threshold value for slow query checking.

query_monitor_alert_long_running_query

true

Raises an alarm if a query is executed for longer than query_monitor_long_running_query_ms.

query_monitor_kill_long_running_query

false

Kill the query if the query executed for longer than query_monitor_long_running_query_ms.

query_monitor_long_running_query_time_ms

30000

Raises an alarm if a query is executed for longer than query_monitor_long_running_query_ms. The minimum value is 1000.

query_monitor_long_running_query_matching_info

 

Match only queries with an ‘Info’ only matching this POSIX regex. No default value, match any Info.

query_monitor_long_running_query_matching_info_negate

false

Negate the result of query_monitor_long_running_query_matching_info.

query_monitor_long_running_query_matching_host

 

Match only queries with a ‘Host’ only matching this POSIX regex. No default value, matches any Host.

query_monitor_long_running_query_matching_db

 

Match only queries with a ‘Db’ only matching this POSIX regex. No default value, matches any Db.

query_monitor_long_running_query_matching_user

 

Match only queries with a ‘User’ only matching this POSIX regex. No default value, matches any User.

query_monitor_long_running_query_matching_user_negate

false

Negate the result of query_monitor_long_running_query_matching_user.

query_monitor_long_running_query_matching_command

Query

Match only queries with a ‘Command’ only matching this POSIX regex. Defaults to ‘Query’.

 

Replication

Name

Default Value

Description

max_replication_lag

10

Max allowed replication lag in seconds before sending an Alarm.

replication_stop_on_error

true

Controls if the failover/switchover procedures should fail if errors are encountered that may cause data loss.

replication_auto_rebuild_slave

false

If the SQL THREAD is stopped and the error code is non-zero then the slave will be automatically rebuilt.

replication_failover_blacklist

 

Comma-separated list of hostname: port pairs. Blacklisted servers will not be considered as a candidate during failover. replication_failover_blacklist is ignored if replication_failover_whitelist is set.

replication_failover_whitelist

 

Comma-separated list of hostname: port pairs. Only whitelisted servers will be considered as a candidate during failover. If no server on the whitelist is available (up/connected) the failover will fail. replication_failover_blacklist is ignored if replication_failover_whitelist is set.

replication_onfail_failover_script

 

This script is executed as soon as it has been discovered that failover is needed. If the script returns non-zero or does not exist, the failover will be aborted. Four arguments are supplied to the script and set if they are known, else empty: arg1=’all servers’ arg2=’failed master’ arg3=’selected candidate’, arg4=’slaves of oldmaster (the candidates)’ and passed like this: ‘scripname arg1 arg2 arg3 arg4’ The script must be accessible on the controller and executable.

replication_pre_failover_script

 

This script is executed before the failover happens, but after a candidate has been elected and it is possible to continue the failover process. If the script returns non-zero or does not exist, the failover will be aborted. Four arguments are supplied to the script and set if they are known, else empty: arg1=’all servers’ arg2=’failed master’ arg3=’selected candidate’, arg4=’slaves of oldmaster (the candidates)’ and passed like this: ‘scripname arg1 arg2 arg3 arg4’ The script must be accessible on the controller and executable.

replication_post_failover_script

 

This script is executed after the failover happens ( a new master is elected and up and running). If the script returns non-zero or does not exist, the failover will be aborted. Four arguments are supplied to the script and set if they are known, else empty.: arg1=’all servers’ arg2=’failed master’ arg3=’selected candidate’, arg4=’slaves of oldmaster (the candidates)’ and passed like this: ‘scripname arg1 arg2 arg3 arg4’ The script must be accessible on the controller and executable.

replication_post_unsuccessful_failover_script

 

This script is executed if the failover attempt fails. If the script returns non-zero or does not exist, the failover will be aborted. Four arguments are supplied to the script and set if they are known, else empty.: arg1=’all servers’ arg2=’failed master’ arg3=’selected candidate’, arg4=’slaves of oldmaster (the candidates)’ and passed like this: ‘scripname arg1 arg2 arg3 arg4’ The script must be accessible on the controller and executable.

 

Retention

Name

Default Value

Description

ops_report_retention

31

The setting of how many days to keep operational reports. Reports matching retention period are removed.

 

Sampling

Name

Default Value

Description

enable_icmp_ping

true

Toggles if ClusterControl shall measure the ICMP ping times to the host.

host_stats_collection_interval

30

Setting for the host (CPU, memory, etc) collection interval.

host_stats_window_size

180

Setting the window size (in seconds) to examine stats to raise/clear host stats alarms.

db_stats_collection_interval

30

Setting for database stats collection interval.

db_proc_stats_collection_interval

5

Setting for database process stats collection interval. Min allowed value is 1 second. Requires a cmon service restart.

lb_stats_collection_interval

15

Setting for load balancer stats collection interval.

db_schema_stats_collection_interval

108000

Setting for schema stats monitoring interval.

db_deadlock_check_interval

0

How often to check for deadlocks. Specified in seconds. Deadlock detection will affect CPU usage on database nodes.

log_collection_interval

600

Controls the interval between logfile collections.

db_hourly_stats_collection_interval

5

Controls how many seconds are between every individual sample in the hourly range statistics.

monitored_mountpoints

 

The list of mount points to be monitored.

monitor_cpu_temperature

false

Monitor CPU temperature.

log_queries_not_using_indexes

false

Set the query monitor to detect queries not using indexes.

query_sample_interval

1

Controls the query monitor interval in seconds, -1 means no query monitoring.

query_monitor_auto_purge_ps

false

If enabled, the P_S table events_statements_summary_by_digest will be auto-purged (TRUNCATE TABLE) every hour.

schema_change_detection_address

 

Checks will be executed (using SHOW TABLES/SHOW CREATE TABLE) to determine if the schema has changed. The checks are executed on the address specified and are of the format HOSTNAME:PORT. The schema_change_detection_databases must also be set. A diff of a changed table is created.

schema_change_detection_databases

 

Comma separated list of databases to monitor for schema changes. If empty, no checks are made.

schema_change_detection_pause_time_ms

0

Pause time in ms between each SHOW CREATE TABLE. The pause time will affect the duration of the detection process.

enable_is_queries

true

Specifies whether queries to the information_schema will be executed or not. Queries to the information_schema may not be suitable when having many schema objects (100s of databases, 100s of tables in each database, triggers, users, events, sprocs). If disabled, the query that would be executed will be logged so it can be determined if the query is suitable in your environment.

 

Swapping

Name

Default Value

Description

swap_warning

20

Warning alarm threshold for swap usage.

swap_critical

90

Critical alarm threshold for swap usage.

swap_inout_period

0

The interval for swap I/O alarms (<= 0 disables).

swap_inout_warning

10240

The number of pages swapped I/O in the specified interval (swap_inout_period, by default 10 minutes) for warning.

swap_inout_critical

102400

The number of pages swapped I/O in the specified interval (swap_inout_period, by default 10 minutes) for critical.

 

System

Name

Default Value

Description

cmon_config_path

/etc/cmon.d/cmon_x.cnf

The config file path. This configuration value is read-only.

os

debian/redhat

The OS type. Possible values are ‘debian’ or ‘redhat’.

libssh_timeout

30

The network timeout value for SSH connections.

sudo

sudo -n 2>/dev/null

The command used to obtain superuser privileges.

ssh_port

22

The port for SSH connections to the nodes.

local_repo_name

 

The used local repository names for cluster deployment.

frontend_url

 

The URL sent in the emails to direct the recipient to the ClusterControl web interface.

purge

7

How long ClusterControl shall keep data. Measured in days, jobs, job messages, alarms, collected logs, operational reports, database growth information older than this will be deleted.

os_user_home

/home/user

The HOME directory of the user used on nodes.

cmon_mail_sender

 

The used email sender for sent emails.

plugin_dir

 

The path of the plugins directory.

use_internal_repos

false

Setting which disabled the 3rd party repository to be set up.

cmon_use_mail

false

Setting to use the ‘mail’ command for e-mailing.

enable_html_emails

true

Enables sending of HTML emails.

send_clear_alarm

true

Toggles the email sending in case of cluster alarms being cleared.

software_packagedir

 

This is the storage location of software packages, i.e, all necessary files to successfully install a node, if there is no yum/apt repository available, must be placed here. Applies mainly to MySQL Cluster or older Codership/Galera installations.

Threshold

Name

Default Value

Description

ram_warning

80

Warning alarm threshold for RAM usage.

ram_critical

90

Critical alarm threshold for RAM usage.

diskspace_warning

80

Warning alarm threshold for disk usage.

diskspace_critical

90

Critical alarm threshold for disk usage.

cpu_warning

80

Warning alarm threshold for CPU usage.

cpu_critical

90

Critical alarm threshold for CPU usage.

cpu_steal_warning

10

Warning alarm threshold for CPU steal.

cpu_steal_critical

20

Critical alarm threshold for CPU steal.

cpu_iowait_warning

50

Warning alarm threshold for CPU IO Wait.

cpu_iowait_critical

60

Critical alarm threshold for CPU IO Wait.

slow_ssh_warning

6

A Warning alarm will be raised if it takes longer than the specified time to set up an SSH connection (secs).

slow_ssh_critical

12

A Critical alarm will be raised if it takes longer than the specified time to set up an SSH connection (secs).

Conclusion

As you can see, there are many parameters to change if you need to adapt ClusterControl to your workload or business. It could be a time-consuming task to review all the values and change them accordingly, but at the end of the day, it will save time as you can make the most out of all the ClusterControl features.

Subscribe below to be notified of fresh posts