CloudWatch
Query and monitor AWS CloudWatch logs, metrics, and alarms
AWS CloudWatch is a monitoring and observability service that provides data and actionable insights for AWS resources, applications, and services. CloudWatch collects monitoring and operational data in the form of logs, metrics, and events, giving you a unified view of your AWS environment.
With the CloudWatch integration, you can:
- Query Logs (Insights): Run CloudWatch Log Insights queries against one or more log groups to analyze log data with a powerful query language
- Describe Log Groups: List available CloudWatch log groups in your account, optionally filtered by name prefix
- Get Log Events: Retrieve log events from a specific log stream within a log group
- Describe Log Streams: List log streams within a log group, ordered by last event time or filtered by name prefix
- List Metrics: Browse available CloudWatch metrics, optionally filtered by namespace, metric name, or recent activity
- Get Metric Statistics: Retrieve statistical data for a metric over a specified time range with configurable granularity
- Publish Metric: Publish custom metric data points to CloudWatch for your own application monitoring
- Describe Alarms: List and filter CloudWatch alarms by name prefix, state, or alarm type
In Sim, the CloudWatch integration enables your agents to monitor AWS infrastructure, analyze application logs, track custom metrics, and respond to alarm states as part of automated DevOps and SRE workflows. This is especially powerful when combined with other AWS integrations like CloudFormation and SNS for end-to-end infrastructure management.
Integrate AWS CloudWatch into workflows. Run Log Insights queries, list log groups, retrieve log events, list and get metrics, and monitor alarms. Requires AWS access key and secret access key.
Run a CloudWatch Log Insights query against one or more log groups
| Parameter | Type | Required | Description |
|---|
awsRegion | string | Yes | AWS region (e.g., us-east-1) |
awsAccessKeyId | string | Yes | AWS access key ID |
awsSecretAccessKey | string | Yes | AWS secret access key |
logGroupNames | array | Yes | Log group names to query |
queryString | string | Yes | CloudWatch Log Insights query string |
startTime | number | Yes | Start time as Unix epoch seconds |
endTime | number | Yes | End time as Unix epoch seconds |
limit | number | No | Maximum number of results to return |
| Parameter | Type | Description |
|---|
results | array | Query result rows |
statistics | object | Query statistics (bytesScanned, recordsMatched, recordsScanned) |
status | string | Query completion status |
List available CloudWatch log groups
| Parameter | Type | Required | Description |
|---|
awsRegion | string | Yes | AWS region (e.g., us-east-1) |
awsAccessKeyId | string | Yes | AWS access key ID |
awsSecretAccessKey | string | Yes | AWS secret access key |
prefix | string | No | Filter log groups by name prefix |
limit | number | No | Maximum number of log groups to return |
| Parameter | Type | Description |
|---|
logGroups | array | List of CloudWatch log groups with metadata |
Retrieve log events from a specific CloudWatch log stream
| Parameter | Type | Required | Description |
|---|
awsRegion | string | Yes | AWS region (e.g., us-east-1) |
awsAccessKeyId | string | Yes | AWS access key ID |
awsSecretAccessKey | string | Yes | AWS secret access key |
logGroupName | string | Yes | CloudWatch log group name |
logStreamName | string | Yes | CloudWatch log stream name |
startTime | number | No | Start time as Unix epoch seconds |
endTime | number | No | End time as Unix epoch seconds |
limit | number | No | Maximum number of events to return |
| Parameter | Type | Description |
|---|
events | array | Log events with timestamp, message, and ingestion time |
List log streams within a CloudWatch log group
| Parameter | Type | Required | Description |
|---|
awsRegion | string | Yes | AWS region (e.g., us-east-1) |
awsAccessKeyId | string | Yes | AWS access key ID |
awsSecretAccessKey | string | Yes | AWS secret access key |
logGroupName | string | Yes | CloudWatch log group name |
prefix | string | No | Filter log streams by name prefix |
limit | number | No | Maximum number of log streams to return |
| Parameter | Type | Description |
|---|
logStreams | array | List of log streams with metadata |
List available CloudWatch metrics
| Parameter | Type | Required | Description |
|---|
awsRegion | string | Yes | AWS region (e.g., us-east-1) |
awsAccessKeyId | string | Yes | AWS access key ID |
awsSecretAccessKey | string | Yes | AWS secret access key |
namespace | string | No | Filter by namespace (e.g., AWS/EC2, AWS/Lambda) |
metricName | string | No | Filter by metric name |
recentlyActive | boolean | No | Only show metrics active in the last 3 hours |
limit | number | No | Maximum number of metrics to return |
| Parameter | Type | Description |
|---|
metrics | array | List of metrics with namespace, name, and dimensions |
Get statistics for a CloudWatch metric over a time range
| Parameter | Type | Required | Description |
|---|
awsRegion | string | Yes | AWS region (e.g., us-east-1) |
awsAccessKeyId | string | Yes | AWS access key ID |
awsSecretAccessKey | string | Yes | AWS secret access key |
namespace | string | Yes | Metric namespace (e.g., AWS/EC2, AWS/Lambda) |
metricName | string | Yes | Metric name (e.g., CPUUtilization, Invocations) |
startTime | number | Yes | Start time as Unix epoch seconds |
endTime | number | Yes | End time as Unix epoch seconds |
period | number | Yes | Granularity in seconds (e.g., 60, 300, 3600) |
statistics | array | Yes | Statistics to retrieve (Average, Sum, Minimum, Maximum, SampleCount) |
dimensions | string | No | Dimensions as JSON (e.g., {"InstanceId": "i-1234"}) |
| Parameter | Type | Description |
|---|
label | string | Metric label |
datapoints | array | Datapoints with timestamp and statistics values |
Publish a custom metric data point to CloudWatch
| Parameter | Type | Required | Description |
|---|
awsRegion | string | Yes | AWS region (e.g., us-east-1) |
awsAccessKeyId | string | Yes | AWS access key ID |
awsSecretAccessKey | string | Yes | AWS secret access key |
namespace | string | Yes | Metric namespace (e.g., Custom/MyApp) |
metricName | string | Yes | Name of the metric |
value | number | Yes | Metric value to publish |
unit | string | No | Unit of the metric (e.g., Count, Seconds, Bytes) |
dimensions | string | No | JSON string of dimension name/value pairs |
| Parameter | Type | Description |
|---|
success | boolean | Whether the metric was published successfully |
namespace | string | Metric namespace |
metricName | string | Metric name |
value | number | Published metric value |
unit | string | Metric unit |
timestamp | string | Timestamp when the metric was published |
List and filter CloudWatch alarms
| Parameter | Type | Required | Description |
|---|
awsRegion | string | Yes | AWS region (e.g., us-east-1) |
awsAccessKeyId | string | Yes | AWS access key ID |
awsSecretAccessKey | string | Yes | AWS secret access key |
alarmNamePrefix | string | No | Filter alarms by name prefix |
stateValue | string | No | Filter by alarm state (OK, ALARM, INSUFFICIENT_DATA) |
alarmType | string | No | Filter by alarm type (MetricAlarm, CompositeAlarm) |
limit | number | No | Maximum number of alarms to return |
| Parameter | Type | Description |
|---|
alarms | array | List of CloudWatch alarms with state and configuration |