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
8
votes
4 answers

Can I attach a CloudWatch event rule to a 'built-in target' via Terraform?

The goal here is to create scheduled snapshots of EBS volumes. Looking at Terraform's documentation for aws_cloudwatch_event_target it doesn't seem possible, but I could be missing something.
ds011591
  • 494
  • 8
  • 19
8
votes
5 answers

CloudWatch Events rule Limits

what is the maximum number of rules for cloud watch I can create on my AWS account. I might have a lot of different rules that will invoke lambda function on schedule. Is it unlimited?
johnny
  • 2,032
  • 1
  • 25
  • 45
8
votes
4 answers

Filter AWS Cloudwatch Lambda's Log

I have a Lambda function and its logs in Cloudwatch (Log group and Log Stream). Is it possible to filter (in Cloudwatch Management Console) all logs that contain "error"? For example logs containing "Process exited before completing request".
bpavlov
  • 1,080
  • 12
  • 32
8
votes
2 answers

spark streaming throughput monitoring

Is there a way to monitor the input and output throughput of a Spark cluster, to make sure the cluster is not flooded and overflowed by incoming data? In my case, I set up Spark cluster on AWS EC2, so I'm thinking of using AWS CloudWatch to monitor…
8
votes
1 answer

How can I get the aggregate of two CloudWatch metrics in a single metric?

I want to get average of network input and network output metric as a single metric from Amazon CloudWatch. Is there any way to achieve this or any script or opensource tools available?
dkkashyap
  • 121
  • 2
  • 5
8
votes
2 answers

Stopping AWS Cloudwatch INSUFFICIENT_DATA to OK transition emails

With Cloudwatch alarms I want to know about ALARM -> OK transition, but INSUFFICIENT_DATA -> OK transition just gets really annoying. Is there a way to stop the latter notification? I could do via an email filter but would rather stop it at the…
imcdnzl
  • 1,011
  • 7
  • 13
8
votes
5 answers

AWS Cloudwatch monitoring for S3

Amazon Cloudwatch provides some very useful metrics for monitoring my EC2s, load balancers, elasticache and RDS databases, etc and allows me to set alarms for a whole range of criteria; but is there any way to configure it to monitor my S3s as well?…
Mark Baker
  • 209,507
  • 32
  • 346
  • 385
7
votes
0 answers

AWS : Cloudwatch logs only published after Batch job is completed

I am using a AWS Batch job , which triggers an ECR Image ( Docker Image containing python code) and the batch logs to Cloudwatch. As per the code inside Docker, I am using print command to log as shown below. The issue is all the print statements…
7
votes
0 answers

Cloudwatch dashboard insight graphs - can I set binsize dynamically?

I'm using dashboards to monitor various output stats on AWS. Lets say it looks something like this: stats avg(myfield1), min(myfield2), max(myfield3) by bin(1m) This works fine - however I am by default using a bin size of 1 minute - so the data…
Simm
  • 91
  • 4
7
votes
4 answers

AWS: Permissions for exporting logs from Cloudwatch to Amazon S3

I am trying to export logs from one of my CloudWatch log groups into Amazon S3, using AWS console. I followed the guide from AWS documentation but with little success. My organization does not allow me to manage IAM roles/policies, however I was…
7
votes
2 answers

AWS Cloudwatch agent config file removed after startup

Problem I am simply trying to install Cloudwatch Agent on Amazon Linux 2 instances at startup, using AWS userdata. For some reason, after Cloud Init has finished running, all services get restarted and the configuration file I put in the cloudwatch…
Daniel
  • 807
  • 8
  • 24
7
votes
1 answer

How to get a metric/alarm on a failed scheduled AWS ECS task (based on exit code)

We have a setup with AWS ECS task scheduled with CloudWatch Events / EventBridge. We'd like to have metrics & notification for failed runs based on container exit code. We were planning to use FailedInvocations from Monitoring Usage with CloudWatch…
7
votes
3 answers

Delay in AWS Cloudwatch Alarm state change

I have an alarm tracking the metric for LoadBalancer 5xx errors n a single ALB. This should be in an "In alarm" state if 1 datapoint in the past 1 is above the threshold of 2. The period is set to 1 minute. See the alarm details: On 2020-09-23 at…
Tom Harvey
  • 3,681
  • 3
  • 19
  • 28
7
votes
1 answer

How to setup DI to inject ILogger within a lambda function app with single lambda FunctionHandler

I have an MRE lambda project with csproj netcoreapp3.1 true
Judy007
  • 5,484
  • 4
  • 46
  • 68
7
votes
0 answers

How to get Grafana CloudWatch Cross-account / Cross-Region Metrics

I have 4 AWS accounts (DTAP) and I want to be able to create one dashboard in Grafana with the cost per service (for all accounts). So far I can easily create one dashboard in Dev with the costs for all services (using this dashboard:…
Zatarra
  • 337
  • 3
  • 9