Configure Monitoring with Toolbox
On this page
Note
Using Toolbox to configure cluster monitoring is the preferred and default method.metrics
database and pipeline DDLs and predefined values.
Enable the Exporter Process
The memsql-exporter
process (or simply “the exporter”) collects data about a running cluster.
Set the Exporter User
The exporter is typically owned by the database root
user.root
, run the following SQL statements and specify the desired database user for <exporter-user>
and this user's password for <secure-password>
.
Note: The database user that starts the exporter process can differ from the database user that starts the monitoring process.
CREATE USER '<exporter-user>' IDENTIFIED BY '<secure-password>';GRANT CLUSTER, SHOW METADATA, SELECT, PROCESS ON *.* to '<exporter-user>'@'%';
Start the Exporter Process
Perform the following steps on the Source cluster's Master Aggregator.
Note that the exporter process is restarted when the exporter_
variable is set to any non-zero value, including the current value.exporter_
variable can be set by running sdb-admin configure-monitoring --exporter-port <port>
.
Run either of the following to start the exporter.9104
).
Note: If starting the exporter as a database user other than root
, substitute the database user for root
in the --exporter-user
option and this user’s password for <secure-password>
in the --exporter-password
option.
HTTP Connections
On the Source cluster’s Master Aggregator, run the following command to start the exporter.
sdb-admin configure-monitoring \--exporter-user root \--exporter-password <secure-password>
HTTPS Connections
-
Copy the server certificate and key to the Master Aggregator host of the Source cluster.
This certificate will be used by the exporter process and must be readable by the user under which the nodes are running on the host (typically the memsql
user). -
On the Source cluster's Master Aggregator, run the following command to start the exporter.
sdb-admin configure-monitoring \--exporter-user root \--exporter-password <secure-password> \--exporter-use-https \--exporter-ssl-cert=/path/to/server-cert.pem \--exporter-ssl-key=/path/to/server-key.pem \--exporter-ssl-passphrase=<passphrase>Note: The
--exporter-ssl-passphrase
option should only be included if the server key has a passphrase.Refer to configure-monitoring for additional options, including
--exporter-user
and--exporter-password
.
Stop the Exporter
You may stop the exporter at any time by running the following command on the Source cluster's Master Aggregator.
sdb-admin configure-monitoring --stop-exporter
Configure the metrics Database
The monitoring process configures the metrics
database and starts monitoring the cluster.
Set the Monitoring User
Monitoring is typically owned by the database root
user.root
, run the following SQL statements and specify the desired database user for <monitoring-user>
and this user's password for <secure-password>
.
Note: The database user that starts the monitoring process can differ from the database user that starts the exporter process.
CREATE USER '<monitoring-user>' IDENTIFIED BY '<secure-password>';GRANT SELECT, CREATE, INSERT, UPDATE, DELETE, EXECUTE, INDEX, ALTER, DROP, CREATE DATABASE, LOCK TABLES, CREATE VIEW, SHOW VIEW, CREATE ROUTINE ON metrics.* to '<monitoring-user>'@'%';GRANT CREATE PIPELINE, DROP PIPELINE, ALTER PIPELINE, START PIPELINE, SHOW PIPELINE ON metrics.* to '<monitoring-user>'@'%';
Start the Monitoring Process
The monitoring process configures the metrics
database and starts monitoring the cluster.
The following command creates a database named metrics
with a 10-day retention period for the data, and also creates the associated metrics
and blobs
pipelines.metrics
database.
The exporter-host
value must be the Master Aggregator host in the Source cluster.user
and password
are the credentials for the Metrics cluster.retention-period
defines the number of days that data is retained before being deleted.
Please note the following:
-
The database that is created to store monitoring data is named
metrics
by default.You may change the database name by updating the value of the --database-name
option. -
The IP address provided in the
exporter-host
argument must be resolvable by all hosts in the cluster.If the cluster you are monitoring has hosts that contain leaf nodes (as is common in a multi-host vs. single-host deployment), do not use localhost
.Instead, provide the explicit IP address or hostname that the other hosts in the cluster can resolve. -
This command must be run on the Metrics cluster.
-
By default, data from a Source cluster is collected every minute.
This interval can be changed via the --batch-interval
option in the sdb-admin start-monitoring command.
Note
For Metrics clusters running SingleStore 7.--retention-period
applies to all existing Source clusters.
For Metrics clusters running SingleStore 7.--retention-period
can be specified for each Source cluster.--retention-period
only applies to that Source cluster.
Note: If starting the monitoring process as a database user other than root
, substitute the database user for root
in the --user
option and this user’s password for <secure-password>
in the --password
option.
HTTP Connections
Run the following command to start monitoring.
sdb-admin start-monitoring \--database-name metrics \--exporter-host <exporter-hostname-or-IP-address> \--user root \--password <secure-password> \--retention-period 10
HTTPS Connections
-
Copy the CA certificate to the same file path on each host of the Metrics cluster.
Alternatively, a directory containing multiple CA certificates can be provided, and this path must be the same on all hosts.
This directory will be used by the monitoring pipelines and must be readable by the user under which the nodes are running on the host (typically the memsql
user). -
Run the following command to start monitoring.
sdb-admin start-monitoring \--database-name metrics \--exporter-host <exporter-hostname-or-IP-address> \--user root \--password <secure-password> \--retention-period 10 \--ssl-ca /path/to/ca-cert.pem --or----ssl-capath /ca-directory/including/pathRefer to start-monitoring for additional options.
Stop the Monitoring Process
You may stop the monitoring process at any time by running the following command.
Note: If stopping the monitoring process as a database user other than root
, substitute the database user for root
in the --user
option and this user’s password for <secure-password>
in the --password
option.
sdb-admin stop-monitoring \--exporter-host <exporter-hostname-or-IP-address> \--user root \--password <secure-password>
Last modified: September 13, 2024