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
1 answer

CloudFormation cloudwatch namespaces cannot be seen

I am trying to create a cloudwatch alarm as below: 503AlarmELB: Type: AWS::CloudWatch::Alarm DeletionPolicy: Retain Properties: AlarmDescription: "503 HTTP CODE Count is higher than 20" # AlarmName: !Join ["-", [ !Ref…
1
vote
0 answers

AWS Log Insights query with string contains and return string value as alias

I have below query to get data from cloudwatch log : fields @timestamp, @user, @fileName, @fileType, strcontains(@message,'downloaded') or strcontains(@message,'unauthorized') as status | parse @message /(?<@user>(?<=User\s).*(?=\shas))/ | parse…
1
vote
0 answers

boto3 get_metric_statistics is always returning empty datapoints

Getting always empty datapoints (i've checked old post on stackoverflow): cwesponse = cw.get_metric_statistics( Namespace='AWS/EC2', MetricName='CPUUtilization', Dimensions=[ …
1
vote
1 answer

API Gateway - 200 response from Postman, 500 from app

I have an API on AWS API Gateway that takes a POST request and forwards headers and body to a third party API and returns the result. This process works fine when I send the request from Postman, but doesn't work either via cURL or JavaScript. NB -…
Stuart Brown
  • 977
  • 2
  • 22
  • 47
1
vote
0 answers

Get message from Log groups connected on Cloudwatch Alarm with metric filtrer

I have a log group associated with a lambda. I create metric filter for this log groups, like this: I create one alarm for this metric filter: The alarm is activated when I receive in my log group a message containing "technical.ERROR" Then i'm…
1
vote
0 answers

Add metrics automatically in aws cloud watch widgets

In my application, I create a new metric with those dimensions Collection dimensions = Arrays.asList( new Dimension().withName("PlacementString").withValue(form.getPlacementString()), new…
Bilal Fakih
  • 101
  • 6
1
vote
0 answers

AWS Cloudwatch alarm - change in instance id

I am new to AWS & have configured a Cloudwatch alarm to reboot an EC2 instance, if its StatusCheckFailed fails. The issue is that, I frequently make updates to the image AMI and need to terminate the old instance and re-launch it with new AMI. This…
1
vote
0 answers

Inconsistant behavior of aws cloudwatch rule

I'm using Terraform automation to create a CloudWatch rule that triggers an SNS topic when any ec2 instance changes its states. The issue is that when I run the automation codebuild with new updates the rule sometimes triggers the SNS topic and…
1
vote
0 answers

How can I call and endpoint on my Elastic Beanstalk server with Amazon Eventbridge?

I want to create a scheduled job (cron), in which Amazon Eventbridge calls an endpoint from my application (hosted on Beanstalk) every X minutes. According to the documentation, API calls are only mentioned for third parties outside of AWS:…
1
vote
0 answers

Cloudwatch metrics - Math expression SUM([IF]) on AWS is not giving valid result

I have created metrics m1 based on sample count. I am trying to filter the datapoints which are above the threshold value of 13000. I am using the If expression to do the evaluation. IF(m1 > 13000, m1, 0) The IF expression is showing the right…
Neelesh
  • 343
  • 5
  • 14
1
vote
1 answer

How do I parse by regular expressions only on filtered lines on Cloudwatch log insights?

Is there a way to restructure this cloudwatch insights query so that it runs faster? fields @timestamp, @message | filter @message like /NewProductRequest/ | parse @message /.*"productType":\s*"(?\w+)"/ | stats count(*) group…
1
vote
0 answers

Enable AWS SDK Service client metrics in C++

I want to enable aws service client metrics in aws sdk c++ , In java v2 we have the option to enable aws sdk service clients metrics like (Pending connection, Max connection) details please refer this page -…
1
vote
1 answer

How to get cloudwatch metrics of a lambda using boto3 and lambda python?

I have a Lambda in which I'm trying to get the metrics (especifically the number of invokes) from Cloudwatch of another Lambda. I was following the docs from…
1
vote
1 answer

How to set the second that eventBridge events trigger at?

I can trigger and EventBridge (rule/schedule feature formerly in CloudWatch) scheduled function with a rate (say, once-every 5 minutes) or via a cron setup to do the same. And the rate-setting will routinely trigger at: 7:05:13, 7:10:13, 7:15:13,…
lowcrawler
  • 6,777
  • 9
  • 37
  • 79
1
vote
1 answer

CloudWatch metrics graph with condition on date of metric

Is it possible to access the date of the metric from a math expression in a custom CloudWatch graph, to be used in a IF(...) condition? Background: I've made a custom CloudWatch graph showing the cost of a lambda, by calculating it from two standard…
JHH
  • 8,567
  • 8
  • 47
  • 91
1 2 3
99
100