1. Home
  2. Docs
  3. ClusterControl
  4. User Guide (GUI)
  5. TimeScaleDB
  6. Overview

Overview

Provides a summary of all database nodes in the cluster. This page is accessible only if there is a cluster deployed by ClusterControl via Deploy Database Cluster or imported into ClusterControl via Import Existing Server/Cluster.

Cluster Actions

Provides shortcuts to the main cluster functionality. For TimeScaleDB Streaming Replication, the action menu consists of:

Field Description
Add Load Balancer
Add Replication Slave
  • Deploys a replication slave attached to this cluster. Choose one of the TimeScaleDB nodes to be a master. See Add Replication Slave.
Change RPC API Token
  • Serves as the authentication string by ClusterControl UI to connect to CMON RPC interface. Each cluster has its own unique token.
Configure WAL
  • Configure write-ahead logging and archiving. See Configure WAL.
Create Slave Cluster
Disable/Enable Cluster Recovery
  • Disable or enable cluster recovery.
  • This feature works similarly with the automatic recovery (cluster) toggle button in the summary bar. However, it applies the modification permanently into the CMON configuration file for persistency.
Disable/Enable Node Recovery
  • Disable or enable node recovery. This feature works similarly with the automatic recovery toggle buttons in the summary bar.
  • This feature works similarly with the automatic recovery (node) toggle button in the summary bar. However, it applies the modification permanently into the CMON configuration file for persistency.
Schedule Maintenance Mode
  • Schedules a cluster-wide maintenance mode, where ClusterControl will skip raising up alarms and notifications while the mode is active.
  • All nodes in the cluster (regardless of the role) will be marked under maintenance. A global banner will appear if there is upcoming maintenance for the corresponding cluster.
Delete Cluster
  • This action will remove the corresponding cluster from ClusterControl supervision and will NOT uninstall the actual database cluster.
  • If you want to re-add the cluster, you have to use Import Existing Server/Cluster.
Deregister Cluster from UI
  • Unregister a database cluster from the ClusterControl UI.
  • You can still re-register your cluster to ClusterControl at a later stage by using Cluster Registrations.
Note

You can retrieve the RPC API Token value directly from respective /etc/cmon.d/cmon_{clusterID}.cnf.

Add Replication Slave

TimeScaleDB replication slave requires at least a master node. The following must be true for the master:

  • At least one master under the same cluster ID.
  • Only TimeScaleDB 10.x, 11.x, 12.x or 13.x is supported.
  • Master’s TimeScaleDB port is accessible by ClusterControl and slaves.

For the slave, you would need a separate host or VM, with or without TimeScaleDB installed. If you do not have a TimeScaleDB installed, and choose ClusterControl to install the TimeScaleDB on the slave, ClusterControl will perform the necessary actions to prepare the slave, for example, create a slave user, configure TimeScaleDB, start the server, and also start the replication. Prior to the deployment, you must perform the following actions:

  • The slave node must be accessible using passwordless SSH from the ClusterControl server
  • TimeScaleDB port (default 5432) on the slave is open for connections for at least the ClusterControl server and the other members in the cluster.

To prepare the TimeScaleDB configuration file for the slave, go to ClusterControl → Manage → Configurations → Template Configuration files. Later, specify this template file when adding a slave.

Add New Replication Slave

The slave will be set up from a streamed backup using pg_basebackup from the master to the slave.

Field Description
Master Server
  • Select a master server.
Slave Server
  • Specify the IP address or FQDN of the slave node. This node must be accessible from the ClusterControl node via passwordless SSH.
Do you want to install the Slave server?
  • Yes – Install TimeScaleDB Server packages. It will be based on the repository and vendor used by the master. For example, if you are running on TimeScaleDB 10.x, ClusterControl will use the same repository to setup the slave
Disable firewall
  • Check the box to disable the firewall (recommended).
Disable SELinux/AppArmor
  • Check the box to let ClusterControl disable AppArmor (Ubuntu) or SELinux (RedHat/CentOS) if enabled (recommended).
Note

Existing TimeScaleDB server packages will be uninstalled.

Add Existing Replication Slave

Add an existing replication slave into ClusterControl. Use this feature if you have added a replication slave manually to your cluster and want it to be detected and managed by ClusterControl. ClusterControl will then detect the new database node as being part of the cluster and starts to manage and monitor it as with the rest of the cluster nodes. Useful if a node has been configured outside of ClusterControl e.g, through Puppet, Chef, or Ansible.

Field Description
Hostname
  • IP address or FQDN of the target node. If you already have the host added under ClusterControl → Manage → Hosts, you can just choose the host from the dropdown menu.
Port
  • TimeScaleDB port. Default is 5432.

Create SSL Encryption

Enable encrypted SSL client-server connections for the database node(s). The same certificate will be used on all nodes. To enable SSL encryption the nodes must be restarted. Select ‘Restart Nodes’ to perform a rolling restart of the nodes.

Field Description
Create Certificate
  • Create a self-signed certificate immediately and use it to set up SSL encryption.
Certificate Expiration (days)
  • A number of days before the certificate become expired and invalid. Default is 10 years (3650 days).
Use Certificate
Restart Cluster
  • Restart Nodes – Automatically perform rolling restart of the nodes after setting up certificate and key.
  • Do Not Restart Nodes – Do nothing after setting up the certificate and key. The user has to perform the server restart manually.

Cluster-to-Cluster Replication

This feature allows you to create a new cluster that will be replicating from this cluster. One primary use case is for disaster recovery by having a hot standby site/cluster which can take over when the main site/cluster has failed. Clusters can be rebuilt with an existing backup or by streaming from a master on the source cluster.

For PostgreSQL-based clusters, ClusterControl will configure asynchronous streaming replication between a master cluster to a slave cluster.

Field Description
Cluster Provisioning Data
  • Choose one method to provision the slave’s cluster data:
  • Streaming from the master: Stream the data from a master using a hot backup tool e.g, pg_basebackup.
  • Stage cluster from backup: Choose an existing full backup from the dropdown list. If none is listed, take a full backup of one of the nodes in your cluster which have binary logging enabled.
Replication Master
  • A node of the source cluster to replicate from. For PostgreSQL/TimescaleDB, pick the master node from the source cluster.

Once the above options have been selected, the cluster deployment wizard will appear similar to deploying a new cluster. See Deploy Database Cluster.

A slave cluster will appear in the database cluster list after deployment finishes. You will notice the slave cluster entry is a bit indented in the list, with a pointed arrow coming from the source cluster, indicating the cluster-cluster replication is now active.

Configure WAL

Enabling Write-ahead Logging (WAL) makes it possible to support on-line backup and point-in-time recovery in PostgreSQL.

Field Description
Archive Mode
  • Off: WAL logs are not archived, thus point-in-time recovery will not be possible.
  • On: WAL logs are archived only if the node is a master mode.
  • Always: WAL logs are archived no matter the node is master or slave mode.
Compressed WAL Archive
  • Whether to enable compression if WAL logs are archived. Default is enabled.
Custom WAL Archive Directory
  • Path to the WAL archive directory. If empty, the default path is /var/lib/pgsql/13/wal_archive.
Nodes
  • WAL can be enabled/archived on all database nodes, or on an individual database node.
Warning

Changing the current value leads to loss of collected continuos WAL archive and thus loss of time frame to do point-in-time recovery (PITR).

Server Load

The Server Load graph provides an overview of aggregated load on your database server.

Field Description
Dash Settings
Filter by Host
  • Show the data for a selected host on the corresponding graph.
Connections
  • The number of aggregated connections to the database nodes.
Commits
  • The number of COMMITS statements on the database node.
Fetched
  • The number of aggregated SELECT queries on the database node.
Inserted
  • The number of aggregated INSERT queries on the database node.
Updated
  • The number of aggregated UPDATE queries on the database node.
Deleted
  • The number of aggregated DELETE queries on the database node
Rollbacks
  • The number of ROLLBACKS statements on the database node.

Custom Dashboard

Customize your dashboard on the Overview page by selecting which metrics and graphs to display. For TimeScaleDB nodes, 2 graphs are configured by default:

Dashboard Name Description
Server Load Shows aggregated load on your database node.
Cache hit ratio Shows aggregated data on overall hit ratios.

The created custom dashboards will appear as tabs beside Dash Settings.

Field Description
Dashboard Name
  • Give a name to the dashboard.
Metric
  • Select an available metric from the list.
Scale
  • Choose between linear or logarithmic graph scale
Selected as Default Graph
  • Choose Yes if you want to set the graph as default when viewing the Overview page.
Note

You can rearrange dashboard order by drag and drop above.

Hosts/Nodes Statistics

Displays a summary of host and database-related stats for all database nodes.

Standalone Nodes Grid

Field Description
Hostname
  • The TimeScaleDB master hostname or IP address.
Version
  • TimeScaleDB server version.
Refresh
  • Fetch the latest update.

Master Nodes Grid

This grid appears if ClusterControl detects master TimeScaleDB node, where select pg_is_in_recovery() returns false.

Field Description
Hostname
  • The TimeScaleDB master hostname or IP address.
Version
  • TimeScaleDB server version.
Writable
  • Green tick – Node is writable.
  • Red cross – Node is read-only.
Refresh
  • Fetch the latest update.

Slave Nodes Grid

This grid appears if ClusterControl detects any standby TimeScaleDB node, where select pg_is_in_recovery() returns true.

Field Description
Hostname
  • The TimeScaleDB slave hostname or IP address.
Version
  • TimeScaleDB server version.
Replication State
  • Current WAL sender state.
Master Host
  • The master host that the slave is connected to.
Received Location
  • The last transaction log position sent on this connection.
Replay Location
  • The last transaction log position replayed into the database on this standby server.
Lag (sec.)
  • How many seconds this slave behind the master.
Writable
  • Green tick – Node is writable.
  • Red cross – Node is read-only.
Refresh
  • Fetch the latest update.

Hosts

Shows collected system statistics in a table as below:

Field Description
Ping
  • Ping round trip from ClusterControl host to each host in milliseconds.
CPU util/steal
  • Total CPU utilization in percentage.
Loadavg (1/5/15)
  • Load value captured for 1, 5, and 15 minutes average.
Net (tx/s / rx/s)
  • Amount of data transmitted and received by the host.
Disk read/sec
  • Amount of disk read of monitored_mountpoint.
Disk writes/sec
  • Amount of disk write of monitored_mountpoints.
Uptime
  • Host uptime.
Last Updated
  • The last time ClusterControl fetch for host’s status.
Refresh
  • Fetch the latest update.
Attention

Starting from ClusterControl 1.9.7 (September 2023), ClusterControl GUI v2 is the default frontend graphical user interface (GUI) for ClusterControl. Note that the GUI v1 is considered a feature-freeze product with no future development. All new developments will be happening on ClusterControl GUI v2. See User Guide (GUI v2).

Was this article helpful to you? Yes No