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
1
vote
0 answers

AWS Cloudwatch setup - initial_position parameter in the new logs agent

In older version of AWS Cloudwatch agent, there was a parameter for initial_position. But I am not able to find it in the new Cloudwatch agent. Older version of CloudWatch initial_position =…
bgth
  • 450
  • 9
  • 26
1
vote
2 answers

Referencing an EC2 instance's name tag in AWS CloudFormation without parameterization

I have a CloudFormation stack that creates an EC2 instance and gives it a name tag. I want to create a CloudWatch alarm, and reference the EC2 instance's name in the alarm's name - something like AlarmName: !Sub "Status Check Alarm -…
alex
  • 6,818
  • 9
  • 52
  • 103
1
vote
0 answers

How can I know the total time that EBS Volume state is Available?

I want to remove EBS that is available for a long time. I want to remove EBS based on the total time available Can I check using cloudwatch? Is there no choice but to write code using lambda? How can I know the total time that EBS Volume state is…
1
vote
1 answer

How to increase resolution of CpuUtilization metric of ECS cluster past 1 min mark?

I'm trying to create a robust autoscaling process for my ECS cluster but am facing problems with resolution of CpuUtilization metric. I have turned on 'Detailed metrics' for 1-min resolution, but am not able to achieve good scaling results. I am…
1
vote
1 answer

AWS Lambda python function - Add error metrics in cloudwatch for handled exception

I would like to be able to see in Cloudwatch metrics (and Lambda metrics) errors for handle exception. For the moment I see the errors only in Cloudwatch log group for handled errors. Here is the code I use in my Lambda def lambda_handler(event,…
Nico
  • 103
  • 1
  • 11
1
vote
0 answers

How to share CloudWatch dashboard (data) without leaking all your data?

All of the following options leak all your accounts CloudWatch data. 1. Sharing dashboards via AWS console Warning All people who you share the dashboard with are granted the permissions listed in Permissions that are granted to people who you…
springfan
  • 21
  • 1
1
vote
1 answer

REST API not recognizing events (AWS)

I have an API that is connected to a lambda function that has queryStringParameters. On the function end I have VARIABLE = event['queryStringParameters']['variable'] When I deploy my API and try to use it "api_url"?variable=something, I get…
user15436810
1
vote
1 answer

ValidationException: Parameter ScheduleExpression is not valid

My cron syntax is cron(25 8 10 2 4 2022) And I wish to run the job exactly once on Thursday February 10 at 8:25 am. But getting the above error when trying to run.
1
vote
1 answer

AWS Cloudwatch logs auto scroll

I am collecting logs from AWS Cloudwatch. I have selected a log stream and a regex expression for which I want to collect logs. I have to select all the logs for some duration, but the issue is the logs are loaded for one second at a time so have…
1
vote
1 answer

AWS: SNS SMS how to include message attributes in logs

Context Right now I'm sending SMS messages using SNS, but without using topics, i.e. directly to the destination phone number. In this action I'm allowed to include "message attributes" (which are basically key-value pairs for metadata). I have SNS…
1
vote
0 answers

Cloudwatch insight query automate endtime and start time

I am trying to automate generation of a report based on an insight query, every Monday for the past week. I need to run an insight query every Monday as a cron job. Could someone guide me on how I could automate setting the end time and start time…
1
vote
0 answers

How send from log file to aws cloudwatch at the ecs container environment

I deploy my web site in the AWS ECS container and use for it the php:7.4-apache image. My web site writes all logs to application.log file, not to the /dev/stdout. I am looking for solution, how I can upload the application.log to AWS…
1
vote
1 answer

Django logging with watchtower got an unexpected keyword argument in handler

I'm trying to implement django logging with AWS CloudWatch, after creating the user and entering the correct fields, following the guides scattered on the web, I still have an error: ValueError: Unable to configure handler 'watchtower': __init__()…
Plaoo
  • 417
  • 3
  • 19
1
vote
1 answer

Log Laravel API calls to AWS Cloudwatch

I have been using this package (https://github.com/maxbanton/cwh) to setup logging in my laravel 8 app. I can already send the logs properly and see them in Cloudwatch and what I am trying to do is to log the API calls (request and response). I was…
TheGPWorx
  • 857
  • 3
  • 17
  • 37
1
vote
1 answer

AWS Cloudwatch Node.js stack trace printed in separate log entries

Currently, when an error happens in my Node.js application, each line in the stack trace is printed in a separate log entry, as shown below: What can I do so that, for a single error, its stack trace prints in a single log entry?