CloudWatch
CloudWatch is used to monitor AWS resources and use alarms, logs, and events to take automated action to reduce mean time to resolution.
Integration Actions
You can add these actions in the Spot Connect workflow builder as part of your workflow:
CloudWatch Create Rule
Use this action node to create a CloudWatch rule.
Input
Parameter | Description | Required | |
---|---|---|---|
Rule Name | CloudWatch Rule Name | True | |
Schedule Expression | Schedule expression, e.g., cron(0 20 * * ? *) or rate(5 minutes) | False | |
Event Pattern | Event pattern for the CloudWatch rule | False | |
State | Initial state of the CloudWatch rule | False | |
Description | A brief description of the CloudWatch rule | False | |
IAM Role ARN | ARN of the IAM role associated with the CloudWatch rule | False | |
Region Name | AWS Region Name | False |
Output
Parameter | Type | Description |
---|---|---|
rule_arn | String | ARN of the cloudwatch rule created. |
execution_status | String | Status of run (ie: S_OK / E_FAIL) |
Action Example
Input
- From the workflow builder in the left panel, drag and drop the CloudWatch Create Rule action node in the workflow builder. Connect it with the trigger.
- Click the action node.
- In the Target Account Alias drop-down menu, select a Target Account Alias.
- Create a CloudWatch Rule name.
- Optional inputs:
- Schedule Expression: Select an expression to self-trigger the rule. Use rate or Cron expressions.
- Event Pattern: Create an event pattern for the CloudWatch rule.
- State: Select a State.
- Description field: Enter a description.
- IAM Role ARN: Enter an IAM role associated with the CloudWatch rule.
- Region Name: Select a region.
- Click Run Now to execute the workflow.
Output
- rule_arn is the ARN of the created CloudWatch rule.
CloudWatch Update Target
Use this action node to update CloudWatch target.
Input
Parameter | Description | Required |
---|---|---|
Rule Name | CloudWatch Rule Name | True |
Target ID | A unique ID for the target to be added/updated | True |
Target ARN | ARN of the target to be added/updated | True |
Region Name | AWS Region Name | False |
Output
Parameter | Type | Description |
---|---|---|
rule_name | String | Name of CloudWatch rule |
target_id | String | Unique ID of the target added/updated |
failed_entry_count | Integer | Count of failed entries |
failed_entries | Object | ID of failed target and error code |
execution_status | String | Status of run (ie: S_OK / E_FAIL) |
Action Example
Input
- From the workflow builder in the left panel, drag and drop the CloudWatch Update Target action node in workflow builder. Connect it with the trigger.
- Click the action node.
- Target Account Alias: Select a target account alias.
- CloudWatch Rule Name: Provide a CloudWatch rule name.
- Target ID: Provide a unique ID for the target within the rule which can be used to reference the target.
- Target ARN: Provide an ARN of a target resource to update.
- Optional: Select a region.
- Click Run Now to execute the workflow.
Output
- failed_entry_count is the number of requests failed.
- failed_entries provides the ID of the failed target and the error code.