Links
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.

Syntax

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>' ];

Jump to

Connection Options

AWS_ROLE — editable

Type: text
(Optional) The AWS IAM role ARN. Used in conjunction with EXTERNAL_ID.
If omitted, the role created when integrating Upsolver with the AWS account is used.

EXTERNAL_ID — editable

Type: text
(Optional) The external ID of the role to assume. Used in conjunction with AWS_ROLE.
If omitted, the role created when integrating Upsolver with the AWS account is used.

AWS_ACCESS_KEY_ID — editable

Type: text
(Optional) The AWS access key ID. Used in conjunction with AWS_SECRET_ACCESS_KEY.
If omitted, the role created when integrating Upsolver with the AWS account is used.

AWS_SECRET_ACCESS_KEY — editable

Type: text
(Optional) The AWS secret key corresponds to the provided AWS_ACCESS_KEY_ID.
If omitted, the role created when integrating Upsolver with the AWS account is used.

REGION

Type: text
The AWS region to use.

COMMENT — editable

Type: text
(Optional) A description or comment regarding this connection.

Example

Create a 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.

Create a job

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.