Comment on page
Amazon CloudWatch
To export monitoring data from your Upsolver account, you must first create a connection that provides the appropriate credentials to access your Amazon CloudWatch.
CREATE CLOUDWATCH CONNECTION <connection_identifier>
[ AWS_CREDENTIALS =
{ AWS_ROLE = '<role_arn>'
EXTERNAL_ID = '<external_id>'
| AWS_ACCESS_KEY_ID = '<key_id>'
AWS_SECRET_ACCESS_KEY = '<key>' } ]
REGION = '<region>'
[ COMMENT = '<comment>' ];
Type:
text
If omitted, the role created when integrating Upsolver with the AWS account is used.
Type:
text
If omitted, the role created when integrating Upsolver with the AWS account is used.
Type:
text
If omitted, the role created when integrating Upsolver with the AWS account is used.
Type:
text
If omitted, the role created when integrating Upsolver with the AWS account is used.
Type:
text
The AWS region to use.
Type:
text
(Optional) A description or comment regarding this connection.
The following example creates a new connection named my_cloudwatch_connection that will be used to send monitoring information to CloudWatch.
CREATE CLOUDWATCH CONNECTION my_cloudwatch_connection
AWS_ROLE = 'arn:aws:iam::123456789012:role/upsolver-sqlake-role'
REGION = 'us-east-1'
COMMENT = 'CloudWatch connection for Upsolver metrics';
Like any other connection you create in Upsolver, the connection is persistent, so you need only create this once.
The following script creates a job named send_monitoring_data_to_cloudwatch that sends cluster metrics to the CloudWatch account my_cloudwatch_connection created in the above example:
CREATE JOB send_monitoring_data_cloudwatch
START_FROM = NOW
AS INSERT INTO my_cloudwatch_connection
NAMESPACE = 'upsolver'
MAP_COLUMNS_BY_NAME
SELECT utilization_percent AS utilization_percent,
tasks_in_queue AS tasks_in_queue,
memory_load_percent AS memory_load_percent,
cluster_id AS tags.cluster_id,
cluster_name AS tags.cluster_name,
RUN_START_TIME() AS time
FROM system.monitoring.clusters;
The job writes to the upsolver namespace in the CloudWatch account and includes the cluster_id and cluster_name as tags, which is helpful if you have multiple clusters in your organization.
Last modified 1mo ago