Skip to main content

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

ParameterDescriptionRequired
Rule NameCloudWatch Rule NameTrue
Schedule ExpressionSchedule expression, e.g., cron(0 20 * * ? *) or rate(5 minutes)False
Event PatternEvent pattern for the CloudWatch ruleFalse
StateInitial state of the CloudWatch ruleFalse
DescriptionA brief description of the CloudWatch ruleFalse
IAM Role ARNARN of the IAM role associated with the CloudWatch ruleFalse
Region NameAWS Region NameFalse

Output

ParameterTypeDescription
rule_arnStringARN of the cloudwatch rule created.
execution_statusStringStatus of run (ie: S_OK / E_FAIL)

Action Example

Input

  1. 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.
  2. Click the action node.
  3. In the Target Account Alias drop-down menu, select a Target Account Alias.
  4. Create a CloudWatch Rule name.
  5. 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.
  6. Click Run Now to execute the workflow.

cloudwatch-1

Output

  • rule_arn is the ARN of the created CloudWatch rule.

cloudwatch-2

CloudWatch Update Target

Use this action node to update CloudWatch target.

Input

ParameterDescriptionRequired
Rule NameCloudWatch Rule NameTrue
Target IDA unique ID for the target to be added/updatedTrue
Target ARNARN of the target to be added/updatedTrue
Region NameAWS Region NameFalse

Output

ParameterTypeDescription
rule_nameStringName of CloudWatch rule
target_idStringUnique ID of the target added/updated
failed_entry_countIntegerCount of failed entries
failed_entriesObjectID of failed target and error code
execution_statusStringStatus of run (ie: S_OK / E_FAIL)

Action Example

Input

  1. 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.
  2. 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.
  3. Click Run Now to execute the workflow.

cloudwatch-3

Output

  • failed_entry_count is the number of requests failed.
  • failed_entries provides the ID of the failed target and the error code.

cloudwatch-4