Questions tagged [amazon-cloudwatch]

Amazon CloudWatch provides monitoring for AWS cloud resources and the applications customers run on AWS. Use this tag when asking about CW features such as metrics or alarms. Use amazon-cloudwatchlogs instead when asking about log groups, log streams, and metric filters.

From the web site:

Developers and system administrators can use it to collect and track metrics, gain insight, and react immediately to keep their applications and businesses running smoothly. Amazon CloudWatch monitors AWS resources such as Amazon EC2 and Amazon RDS DB instances, and can also monitor custom metrics generated by a customer’s applications and services.

Usage Guidance

  • Use this tag when asking about CW metrics or CW alarms, the CW API, etc.
  • Do not use this tag when asking only about log groups, log streams, metric filters, etc; use instead.
  • Use both if asking about both (for example, if asking about a CW Logs metric filter that aggregates in a CW custom metric that triggers a CW alarm)

Resources

4155 questions
22
votes
2 answers

aws cloudwatch logs filter pattern include lines before and/or after matching pattern

Is there a way to include N lines before and/or after a matching pattern in AWS CloudWatch Logs? Let's say I have this query and would like 3 lines before and after each match. aws logs filter-log-events --log-group-name my-group --filter-pattern…
22
votes
1 answer

AWS/ECS CPUUtilization average vs maximum

After reading AWS documentation I am still not clear about cloudwatch metrics statistics average and maximum, specifically for ECS CPUUtilization. I have a AWS ECS cluster fargate setup, a service with minimum count of 2 healthy task. I have enabled…
22
votes
1 answer

AWS Cloudwatch Logs Insights find logs close to another log or timestamp

On AWS Cloudwatch Log Insights, often after you filter your logs and find an interesting log message you want to see what was happening right before or after that message. What is the best way to find log messages right next to another message? I…
Ali
  • 18,665
  • 21
  • 103
  • 138
22
votes
1 answer

When does AWS CloudWatch create new log streams?

AWS CloudWatch has Log Groups and Log streams. A log group seems reasonable to me: Each product (e.g. each Lambda function, each Sagemaker endpoint) has its own log group. But then there are log streams. When does AWS CloudWatch create new log…
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
22
votes
3 answers

Amazon Cloudwatch alarm not triggered

I have a cloudwatch alarm configured : Threshold : "GreaterThan 0" for 1 consecutive period, Period : 1 minute, Statistic : Sum The alarm is configured on top of AWS SQS NumberOfMessagesSent. The queue was empty and no messages were being published…
22
votes
5 answers

Is it possible to have Centralised Logging for ElasticBeanstalk Docker apps?

We have custom Docker web app running in Elastic Beanstalk Docker container environment. Would like to have application logs be available for viewing outside. Without downloading through instances or AWS console. So far neither of solutions been…
Roman
  • 1,920
  • 2
  • 17
  • 17
22
votes
1 answer

What do Network In and Network Out mean in Amazon?

If you got an instance with 10 Gigabit Ethernet. What does it mean? How much bytes do you have in Network In and how much in Network Out as maximum? In the reports of Cloud Watch I can see 80,000,000 in Network In, and 800,000,000 in Network Out.…
21
votes
7 answers

Configure SQS Dead letter Queue to raise a cloud watch alarm on receiving a message

I was working with Dead letter Queue in Amazon SQS. I want that whenever a new message is received by the queue it should raise a CloudWatch alarm. The problem is I configured an alarm on the metric: number_of_messages_sent of the queue but this…
21
votes
2 answers

Combine two Cloudwatch insights queries

I have two Cloudwatch insights queries that I would love to be able to run side by side and compare the results of both two. stats count(*) as requestIdCount by @requestId | filter @message like /START RequestId/ | filter requestIdCount > 1 stats…
AlexLordThorsen
  • 8,057
  • 5
  • 48
  • 103
21
votes
2 answers

Unable to define Math Expression for Cloudwatch Alarm in a Cloudformation Template

Recently AWS announced that Cloudwatch alarms can use Math Expressions on metrics. I decided to create an alarm that compares the SUM of 2 single metrics with a given threshold. This means that according to AWS documentation my expression should be…
P. Str
  • 580
  • 1
  • 5
  • 18
21
votes
2 answers

Disable CloudWatch to monitor logs for Lambda function

Is there any possible way to disable CloudWatch to log Lambda Function's events? If possible, then what are the steps to do this.
Richa Sharma
  • 283
  • 1
  • 3
  • 7
21
votes
4 answers

Does AWS CloudWatch Events Rule supports any wildcards in S3 bucket/key names

I am trying to create an event rule that is triggered by a change in a file in S3 bucket in different AWS account. Detail description is here So far the rule works fine with exact file names, but I need to make it work with filename prefixes. In the…
k1r0
  • 542
  • 1
  • 5
  • 12
20
votes
6 answers

CloudWatch Insights: get logs of errored lambdas

A lambda can have a result that is either a success or an error. I want to see the logs of lambda that errored. I am trying to do that via a CloudWatch Insights query. How can I do this?
20
votes
2 answers

Creating a CloudWatch alarm based on a search expression

I'm attempting to the do the following: I have a DynamoDB global table which publishes the ReplicationLatency metric. I want to create an alarm on the aggregate of the ReplicationLatency metric published for each region. The DDB table replicas…
chrisrhyno2003
  • 3,906
  • 8
  • 53
  • 102
20
votes
6 answers

Automatically "stop" Sagemaker notebook instance after inactivity?

I have a Sagemaker Jupyter notebook instance that I keep leaving online overnight by mistake, unnecessarily costing money... Is there any way to automatically stop the Sagemaker notebook instance when there is no activity for say, 1 hour? Or would…