amazon-cloudwatch-metrics

AWS Cloudwatch Math Expressions: removing Insufficient Data: is there a “coalesce” function like SQL?

好久不见. 提交于 2021-01-29 09:39:48
问题 Can I replace a None/Insufficient data point as a value (constant is fine) in a Cloudwatch Math Expression? I am using a math expression of several metrics: if's, arithmetic, etc. The problem is that you are now bound by all of the variables having sufficient data. If one is missing a datapoint, WHAM! Insufficient data for that math expression. Ideally, I'd like to do something like the following based on the standard SQL coalesce function: coalsece(m1, m2, 15) + coalesce(m3, 25) / coalesce

AWS Cloudwatch Json Metric Filter Pattern

ぃ、小莉子 提交于 2020-02-25 05:43:05
问题 Following the Amazon Example for Json Metric Filter, I tried to copy their example. In the process of creating a metric filter, you can test it with example logs first. So I went for "Custom Log", copy-pasted the example from the link given above: { "eventType": "UpdateTrail", "sourceIPAddress": "111.111.111.111", "arrayKey": [ "value", "another value" ], "objectList": [ { "name": "a", "id": 1 }, { "name": "b", "id": 2 } ], "SomeObject": null, "ThisFlag": true } and my pattern is: { $

How to define a CloudWatch Alarm on the sum of two metrics with CloudFormation?

好久不见. 提交于 2020-02-02 16:26:27
问题 I need to trigger an alarm when the sum of the same metric ( ApproximateNumberOfMessagesVisible ) on two different queues exceed the value of 100 In September '17, this answer stated that the only way to do it was with a Lambda function getting the two values and summing them up via CloudWatch API. At writing time, Feb. '19, it is possible to use "Metric Math", so there is no need to have a lambda function or an EC2 instance. Is it possible to use Metric Math to define an Alarm directly in

Dynamically adding/removing EC2 instances of an AutoscalingGroup to AWS Dashboard Metric Widget

无人久伴 提交于 2020-01-04 14:08:36
问题 I am trying to create a dashboard and want a widget to display the CPUUtilization graphs of ALL EC2 instances within my autoscaling. Whenever a new instance gets added by autoscaling rules then the dashboard widget should include the graph of new EC2 instance automatically and when an instance gets deleted it should remove the graph of that instance. When I select the autoscaling group as the metric it simply displays one line in the graph although there are 4 instances within that

Dynamically adding/removing EC2 instances of an AutoscalingGroup to AWS Dashboard Metric Widget

我们两清 提交于 2020-01-04 14:06:31
问题 I am trying to create a dashboard and want a widget to display the CPUUtilization graphs of ALL EC2 instances within my autoscaling. Whenever a new instance gets added by autoscaling rules then the dashboard widget should include the graph of new EC2 instance automatically and when an instance gets deleted it should remove the graph of that instance. When I select the autoscaling group as the metric it simply displays one line in the graph although there are 4 instances within that

API Gateway Cloudwatch advanced logging

爱⌒轻易说出口 提交于 2019-12-11 16:30:45
问题 I am trying to get to the point of billing for API calls made to our services, this includes creating metrics for each API Key usage, but before I even start that I would like to understand a certain aspect of the CloudWatch logs first. In this first image, you'll notice 1.06 million hits recorded on the graph at 6 weeks and 30 day period: My understanding on this is that the 1.06m is the amount of hits that have taken place on this API, the "custom (6w)" is the time period, i.e. over 6 weeks

setting the widget for cloudwatch dashboard. Getting the error “The dashboard body is invalid, there are 1 validation errors”

我的未来我决定 提交于 2019-12-11 15:56:08
问题 I am not able to ref servicename in the widget. Getting the following error with the given code: The dashboard body is invalid, there are 1 validation errors: [ { "dataPath": "/widgets/0/properties/metrics/0", "message": "Should NOT have more than 3 items" } ] (Service: AmazonCloudWatch; Status Code: 400; Error Code: InvalidParameterInput "CloudwatchDashboard": { "Type": "AWS::CloudWatch::Dashboard", "Properties": { "{ \"widgets\": [{ \"type\":\"metric\", \"x\":0, \"y\":0, \"width\":12, \

How to generate AWS CloudWatch Alarm which involves multiple Metrics

青春壹個敷衍的年華 提交于 2019-12-11 01:57:54
问题 Need to generate CloudWatch Alarm for API Gateway and Lambda functions. For API Gateway CloudWatch Alarm should be generated if 5XX Error count is 10% of total request count at given period (e.g. 5 minutes). Similarly, We need to add a metric if Maximum Latency 6% of total request count > 4 seconds. For such type of metric looks like we need a combination of metric like Sum of total requests and than need to calculate percentage of errors. We have Math Expressions/Metric math which might be