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

How to use aws cloudwatch get-metric-widget-image?

I would like to get Cloudwatch screenshot automatically since I have many instances. But when I try to run get-metric-widget-image by aws cli command tool, I always get error. An error occurred (ValidationError) when calling the…
ingsnow kwan
  • 113
  • 1
  • 5
11
votes
3 answers

AWS CloudWatch metric math with a cumulative metric's value 30 minutes ago to show rate of change

I have a AWS CloudWatch custom metric that represents a cumulative value which continues to increase overtime. I will add that metric to a dashboard, but I also want to show the rate of change of this metric over the last 30 minutes. Ideally I…
plex4r
  • 243
  • 1
  • 2
  • 15
11
votes
3 answers

How to disable default log messages from lambda in python

I have an AWS Lambda function written in python, and i need only the messages I log in CloudWatch Logs. I have tried the example given in watchtower, but it still didn't work. START RequestId: d0ba05dc-8506-11e8-82ab-afe2adba36e5 Version:…
santosh
  • 3,947
  • 3
  • 21
  • 32
11
votes
1 answer

How to determine the Cloudwatch log stream for a Fargate service?

I've got a Fargate service running, and can view its Cloudwatch log streams using the AWS console (navigate to the service, and click on its Logs tab). I'm looking at the AWS documentation for GetLogEvents and see that you can access the logs using…
Alan
  • 3,715
  • 3
  • 39
  • 57
11
votes
2 answers

Log4J2 CloudWatch Appender

I'm looking for an official AWS CloudWatch Appender for Log4J2. I've search all over and didn't find any. Anybody there using CloudWatch in Java Apps with Log4J2?
Gonzalo Gallotti
  • 2,413
  • 3
  • 23
  • 28
11
votes
2 answers

AWS Lambda@Edge debugging

I'm currently working on a lambda@edge function. I cannot find any logs on CloudWatch or other debugging options. When running the lambda using the "Test" button, the logs are written to CloudWatch. When the lambda function is triggered by a…
11
votes
5 answers

Springboot with Spring-cloud-aws and cloudwatch metrics

I would like to start using metrics in my Springboot app and I would also like to publish them my amazon cloudwatch I know that with Springboot we can activate spring-actuator that provides in memory metrics and published them to the /metrics…
Johny19
  • 5,364
  • 14
  • 61
  • 99
11
votes
3 answers

Python: Boto3: get_metric_statistics() only accepts keyword arguments

Just started using Boto3 with Python so definitely new at this. I'm trying to use a simple get_metric_statistics script to return information about CPUUtilization for an instance. Here is the script I'm looking to use: import boto3 import…
user7925487
  • 193
  • 2
  • 3
  • 14
11
votes
3 answers

How to check AWS EC2 instance current uptime

What is the best way to check the EC2 instance uptime and possibly send alerts if uptime for instance is more then N hours? How can it be organized with default AWS tools such as CloudWatch, Lambda ?
11
votes
5 answers

AWS Cloudwatch Event putTargets not adding Lambda event sources

I am making a call to aws cloudWatchEvent putRule & PutTarget api through aws sdk to create a cloudWatch Rule and attach a target to it. My Target is a lambda function, the rule gets created, the target gets attached to the rule but when the rule…
johnny
  • 2,032
  • 1
  • 25
  • 45
11
votes
3 answers

CloudWatch Log costing too much

I've been doing some Amazon AWS tinkering for a project that pulls in a decent amount of data. The majority of the services have been super cheap, however, log storage for Cloud Watch is dominating the bill, cloud watch log storage is $13 of the…
mwright
  • 4,099
  • 7
  • 30
  • 40
11
votes
2 answers

Can I define an EC2 auto scale group with scaling policies without adding alarms to CloudWatch dashboard?

I followed the instructions on http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html in order to have a CPUUtilization based auto scale group. i noticed that the alarms created by mon-put-metric-alarm create…
Jan
  • 2,803
  • 6
  • 36
  • 57
11
votes
3 answers

AWS Cloud watch alarm, triggering autoscaling using multiple metrics

I want to create a cloud watch alarm which triggers autoscaling based on more than one metric data. Since this is not natively supported by Cloud Watch ( Correct me if i am wrong ). I was wondering how to overcome this. Can we get the data from…
Naween Ghimire
  • 111
  • 1
  • 1
  • 3
11
votes
2 answers

How do I use ELB's HealthyHostCount for monitoring in CloudWatch?

We have three EC2 instances—one in each availability zone (AZ) in the eu-west-1 region. They are loadbalanced using ELB. We'd like to monitor how many instances are registered at the loadbalancer, using CloudWatch. The problem ist: I don't really…
awendt
  • 13,195
  • 5
  • 48
  • 66
10
votes
1 answer

Logs not showing up in AWS Cloudwatch

I have been trying to get logging to work on AWS Cloudwatch but have been unsuccessful so far. I am running a python flask backend on Fargate and handling logging through Cloudwatch. Only error messages are showing up however and nothing about the…