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
2 answers

AWS Cognito User Pool - SignInSuccesses CloudWatch Alarm and Metrics in CloudFormation

I have been unsuccessfully trying to implement in CloudFormation what is described in the AWS documentation: Metrics for Amazon Cognito user pools [https://docs.aws.amazon.com/cognito/latest/developerguide/metrics-for-cognito-user-pools.html] for…
1
vote
1 answer

Is there a way to sort logs in AWS Log Insights the same way they appear in the log file?

I have a query in Log Insights that prints some messages from the web.stdout.log file and sorts them by @timestamp. When the timestamp is the same for two messages, it prints them with no order. Is there any way to sort the messages by the same…
1
vote
1 answer

How to trigger Lambda if only there is CloudWatch logs and only once in 5minutes

I have attached CloudWatch logs trigger to my lambda (lambda is with concurrency=1). The lambda makes Athena query which costs us money. The problem is if I have 10 (cloud watch log) files dumped in 2 second time, the lambda is invoked 10 times…
chendu
  • 684
  • 9
  • 21
1
vote
0 answers

AWS Cloudwatch set batch_size and batch_limit options Cloudwatch constructor in node js

Is there a way to set AWS Cloudwatch batch_size and batch_limit options in the Cloudwatch constructor? I have been trying to do something like this var cloudwatch = new AWS.CloudWatch( batch_size: 1000, …
1
vote
0 answers

AWS Elastic Beanstalk CloudWatch log streaming only working for some environments

We run 4 different applications in their own environments on Elastic Beanstalk. 2 of them are Java servers and 2 of them are golang servers. When the applications have been created we have selected the platform depending on the running apps. If i…
1
vote
0 answers

Suddenly net/http tls handshake timeout from Windows Server 2019 to AWS

We got the on-prem servers running in ESXi, a Windows Server 2019 with AWS SSM Agent and Cloudwatch log agent installed, it is running fine and event logs are collected properly. Until these days, suddenly we keep seeing the error net/http tls…
orbulat
  • 11
  • 2
1
vote
2 answers

How to monitor all ec2 by CPU usage via CloudWatch

I am trying to set up monitoring of a large number of ec2s and their number is constantly changing. I would like the owner of this instance to receive a notification when the CPU usage is low for a long time. I can create a function that would get a…
1
vote
0 answers

Indexing with CloudWatch Logs Insights

a question relevant to the one here: I'm trying to figure out how to capture records of a certain indexed difference when querying CWLI. Specifically, I need to find the record after each occurrence of an exception (yes, I know the below is an…
1
vote
1 answer

CloudWatch Alarms based on file existence in Ec2

I have a requirement to monitor for a specific file in the /mnt/file-i-need-to-monitor.txt path where I need to; Create alarms if the file doesn't exist anymore. if [ ! -f /mnt/file-i-need-to-monitor.txt ]; then // create aws alarm and notify…
1
vote
1 answer

Mysterious 500 error with AWS Lambda; unable to debug

I have an API that I host using Lambda (nodejs), with API-gateway. I'm using serverless to deploy. Generally things have been fine, but while I was working on a specific function today, I started to receive HTTP 500 errors when hitting the endpoint.…
1
vote
2 answers

AWS CloudWatch Composite Alarm Cross Account

I have a use case where I want to share my alarms with a specific monitor account within AWS organization. What I then would want to do is to create a composite alarm of all shared alarms. Is this not possible? The "create composite alarm" is greyed…
1
vote
1 answer

AWS EventBridge ECS task status change event

I want to trigger a lambda function when a fargate task is deprovisionning, I created this EventBridge rule : { "source": ["aws.ecs"], "detail-type": ["ECS Task State Change"], "detail": { "clusterArn": ["arn:aws:ecs:eu-west-3:xxx"], …
1
vote
1 answer

Terraform variables in Cloudwatch-agent.json

Can we use terraform variables in Cloudwatch-agent.json config file ? I am publishing Logs to a log group which needs to have a workspace name (TF Variable) included in its name. Now when we are including the variable in JSON file its not pushing…
1
vote
2 answers

How to write AWS Log Insights query for multiple string patterns

I want to write a log insights query to search for multiple string patterns in log groups. I know that I can use the following query to find a specific string in logs : fields @timestamp, @message | filter @message like "test string" | sort…
Sushil
  • 8,250
  • 3
  • 39
  • 71
1
vote
1 answer

Track the number of requests per client per api in Spring Boot using Micrometer

I am using AWS Cloudwatch to monitor my application. I want to track the number of requests I receive per client per API. I have micrometer configured for other metrics. How do I track this metric using micrometer? For reference, I have a finite set…
1 2 3
99
100