AptlyStar

CloudWatch

Query and monitor AWS CloudWatch logs, metrics, and alarms

Instructions d'utilisation

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.

Outils

cloudwatch_query_logs

Run a CloudWatch Log Insights query against one or more log groups

Entrée

ParamètreTypeObligatoireDescription
awsRegionstringOuiAWS region (e.g., us-east-1)
awsAccessKeyIdstringOuiAWS access key ID
awsSecretAccessKeystringOuiAWS secret access key
logGroupNamesarrayOuiLog group names to query
queryStringstringOuiCloudWatch Log Insights query string
startTimenumberOuiStart time as Unix epoch seconds
endTimenumberOuiEnd time as Unix epoch seconds
limitnumberNonMaximum number of results to return

Sortie

ParamètreTypeDescription
resultsarrayQuery result rows (each row is a key/value map of field name to value)
statisticsobjectQuery statistics
↳ bytesScannednumberTotal bytes of log data scanned
↳ recordsMatchednumberNumber of log records that matched the query
↳ recordsScannednumberTotal log records scanned
statusstringQuery completion status (Complete, Failed, Cancelled, or Timeout)

cloudwatch_describe_log_groups

List available CloudWatch log groups

Entrée

ParamètreTypeObligatoireDescription
awsRegionstringOuiAWS region (e.g., us-east-1)
awsAccessKeyIdstringOuiAWS access key ID
awsSecretAccessKeystringOuiAWS secret access key
prefixstringNonFilter log groups by name prefix
limitnumberNonMaximum number of log groups to return

Sortie

ParamètreTypeDescription
logGroupsarrayList of CloudWatch log groups with metadata
↳ logGroupNamestringLog group name
↳ arnstringLog group ARN
↳ storedBytesnumberTotal stored bytes
↳ retentionInDaysnumberRetention period in days (if set)
↳ creationTimenumberCreation time in epoch milliseconds

cloudwatch_get_log_events

Retrieve log events from a specific CloudWatch log stream

Entrée

ParamètreTypeObligatoireDescription
awsRegionstringOuiAWS region (e.g., us-east-1)
awsAccessKeyIdstringOuiAWS access key ID
awsSecretAccessKeystringOuiAWS secret access key
logGroupNamestringOuiCloudWatch log group name
logStreamNamestringOuiCloudWatch log stream name
startTimenumberNonStart time as Unix epoch seconds
endTimenumberNonEnd time as Unix epoch seconds
limitnumberNonMaximum number of events to return

Sortie

ParamètreTypeDescription
eventsarrayLog events with timestamp, message, and ingestion time
↳ timestampnumberEvent timestamp in epoch milliseconds
↳ messagestringLog event message
↳ ingestionTimenumberIngestion time in epoch milliseconds

cloudwatch_describe_log_streams

List log streams within a CloudWatch log group

Entrée

ParamètreTypeObligatoireDescription
awsRegionstringOuiAWS region (e.g., us-east-1)
awsAccessKeyIdstringOuiAWS access key ID
awsSecretAccessKeystringOuiAWS secret access key
logGroupNamestringOuiCloudWatch log group name
prefixstringNonFilter log streams by name prefix
limitnumberNonMaximum number of log streams to return

Sortie

ParamètreTypeDescription
logStreamsarrayList of log streams with metadata, sorted by last event time (most recent first) unless a prefix filter is applied
↳ logStreamNamestringLog stream name
↳ lastEventTimestampnumberTimestamp of the last log event in epoch milliseconds
↳ firstEventTimestampnumberTimestamp of the first log event in epoch milliseconds
↳ creationTimenumberStream creation time in epoch milliseconds
↳ storedBytesnumberTotal stored bytes

cloudwatch_list_metrics

List available CloudWatch metrics

Entrée

ParamètreTypeObligatoireDescription
awsRegionstringOuiAWS region (e.g., us-east-1)
awsAccessKeyIdstringOuiAWS access key ID
awsSecretAccessKeystringOuiAWS secret access key
namespacestringNonFilter by namespace (e.g., AWS/EC2, AWS/Lambda)
metricNamestringNonFilter by metric name
recentlyActivebooleanNonOnly show metrics active in the last 3 hours
limitnumberNonMaximum number of metrics to return

Sortie

ParamètreTypeDescription
metricsarrayList of metrics with namespace, name, and dimensions
↳ namespacestringMetric namespace (e.g., AWS/EC2)
↳ metricNamestringMetric name (e.g., CPUUtilization)
↳ dimensionsarrayArray of name/value dimension pairs

cloudwatch_get_metric_statistics

Get statistics for a CloudWatch metric over a time range

Entrée

ParamètreTypeObligatoireDescription
awsRegionstringOuiAWS region (e.g., us-east-1)
awsAccessKeyIdstringOuiAWS access key ID
awsSecretAccessKeystringOuiAWS secret access key
namespacestringOuiMetric namespace (e.g., AWS/EC2, AWS/Lambda)
metricNamestringOuiMetric name (e.g., CPUUtilization, Invocations)
startTimenumberOuiStart time as Unix epoch seconds
endTimenumberOuiEnd time as Unix epoch seconds
periodnumberOuiGranularity in seconds (e.g., 60, 300, 3600)
statisticsarrayOuiStatistics to retrieve (Average, Sum, Minimum, Maximum, SampleCount)
dimensionsstringNonDimensions as JSON (e.g., {"InstanceId": "i-1234"})

Sortie

ParamètreTypeDescription
labelstringMetric label returned by CloudWatch
datapointsarrayDatapoints sorted by timestamp with statistics values
↳ timestampnumberDatapoint timestamp in epoch milliseconds
↳ averagenumberAverage statistic value
↳ sumnumberSum statistic value
↳ minimumnumberMinimum statistic value
↳ maximumnumberMaximum statistic value
↳ sampleCountnumberSample count statistic value
↳ unitstringUnit of the metric

cloudwatch_put_metric_data

Publish a custom metric data point to CloudWatch

Entrée

ParamètreTypeObligatoireDescription
awsRegionstringOuiAWS region (e.g., us-east-1)
awsAccessKeyIdstringOuiAWS access key ID
awsSecretAccessKeystringOuiAWS secret access key
namespacestringOuiMetric namespace (e.g., Custom/MyApp)
metricNamestringOuiName of the metric
valuenumberOuiMetric value to publish
unitstringNonUnit of the metric (e.g., Count, Seconds, Bytes)
dimensionsstringNonJSON string of dimension name/value pairs

Sortie

ParamètreTypeDescription
successbooleanWhether the metric was published successfully
namespacestringMetric namespace
metricNamestringMetric name
valuenumberPublished metric value
unitstringMetric unit
timestampstringTimestamp when the metric was published

cloudwatch_describe_alarms

List and filter CloudWatch alarms

Entrée

ParamètreTypeObligatoireDescription
awsRegionstringOuiAWS region (e.g., us-east-1)
awsAccessKeyIdstringOuiAWS access key ID
awsSecretAccessKeystringOuiAWS secret access key
alarmNamePrefixstringNonFilter alarms by name prefix
stateValuestringNonFilter by alarm state (OK, ALARM, INSUFFICIENT_DATA)
alarmTypestringNonFilter by alarm type (MetricAlarm, CompositeAlarm)
limitnumberNonMaximum number of alarms to return

Sortie

ParamètreTypeDescription
alarmsarrayList of CloudWatch alarms with state and configuration
↳ alarmNamestringAlarm name
↳ alarmArnstringAlarm ARN
↳ stateValuestringCurrent state (OK, ALARM, INSUFFICIENT_DATA)
↳ stateReasonstringHuman-readable reason for the state
↳ metricNamestringMetric name (MetricAlarm only)
↳ namespacestringMetric namespace (MetricAlarm only)
↳ thresholdnumberThreshold value (MetricAlarm only)
↳ stateUpdatedTimestampnumberEpoch ms when state last changed

cloudwatch_mute_alarm

Create a CloudWatch alarm mute rule that suppresses alarms for a fixed duration

Entrée

ParamètreTypeObligatoireDescription
awsRegionstringOuiAWS region (e.g., us-east-1)
awsAccessKeyIdstringOuiAWS access key ID
awsSecretAccessKeystringOuiAWS secret access key
muteRuleNamestringOuiUnique name for the mute rule (used later to unmute)
alarmNamesarrayOuiNames of the CloudWatch alarms this mute rule targets
durationValuenumberOuiHow long the mute lasts (paired with durationUnit)
durationUnitstringOuiUnit for durationValue: minutes, hours, or days
descriptionstringNonOptional description of why the alarms are being muted
startDatenumberNonWhen the mute window begins as Unix epoch seconds. Defaults to now (mute starts immediately).

Sortie

ParamètreTypeDescription
successbooleanWhether the mute rule was created successfully
muteRuleNamestringName of the mute rule that was created
alarmNamesarrayNames of the alarms this rule mutes
expressionstringSchedule expression used by the mute rule
durationstringISO 8601 duration of the mute window

cloudwatch_unmute_alarm

Delete a CloudWatch alarm mute rule, restoring alarm notifications

Entrée

ParamètreTypeObligatoireDescription
awsRegionstringOuiAWS region (e.g., us-east-1)
awsAccessKeyIdstringOuiAWS access key ID
awsSecretAccessKeystringOuiAWS secret access key
muteRuleNamestringOuiName of the mute rule to delete

Sortie

ParamètreTypeDescription
successbooleanWhether the mute rule was deleted successfully
muteRuleNamestringName of the mute rule that was deleted

On this page