amazon-cloudwatch

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

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

人走茶凉 提交于 2020-01-31 05:33:05
问题 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 GetMetricWidgetImage operation: MetricWidget property 'metricWidget' has a bad JSON content. Is there anyone who could help me out? Thanks. I could not find an example from aws doc. No exact example in below link. https://docs.aws.amazon.com/AmazonCloudWatch/latest

How to disable default log messages from lambda in python

会有一股神秘感。 提交于 2020-01-24 03:55:25
问题 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: $LATEST (randomiser) Hello from Lambda END RequestId: d0ba05dc-8506-11e8-82ab-afe2adba36e5 REPORT RequestId: d0ba05dc-8506-11e8-82ab-afe2adba36e5 Duration: 0.44 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 21 MB* From the above I only need

Amazon Web Service CloudWatch custom metrics with dimensions

喜欢而已 提交于 2020-01-23 04:24:08
问题 I'm trying to push data into a custom metric on AWS CloudWatch but wanted to find out more about the Dimensions and how these are used? I've already read the AWS documentation but it doesn't really explain what they are used for and how it affects the graphing UI in the AWS Management Console. Are Dimensions a way to breakdown the Metric Value further? To give a fictitious example, say I have a metric which counts the number of people in a room. The metric's name is called "Population". I

Customize alarm message from AWS Cloudwatch

♀尐吖头ヾ 提交于 2020-01-23 02:36:47
问题 I got some alarm notifications from AWS Cloudwatch to my email but they are usually sent in a JSON format and the problem is that some of those emails are getting received by non-technical people in my company. I was wondering if that is possible to customize the emails sent by AWS SNS because I don't see any option in how to customize it. 回答1: If you are using Cloudwatch/Event/Rules then you can use "Input transfomer" to customize the contents of the email and then SNS will send that instead

How can I see AWS Gateway logs for external calls?

蹲街弑〆低调 提交于 2020-01-22 17:55:55
问题 I need to be able to see the logs for my calls on AWS API Gateway . When I perform the calls from within Gateway's Dashboard I can see them under the Logs section. How can I see them for external call (e.g.: calls made using curl )? I tried enabling CloudWatch but I can only see the metric, and not the actual log messages. 回答1: The most likely reason for not being able to see API Gateway logs in CloudWatch logs is that you haven't specified the ARN of an IAM role that enables API Gateway to

How do I filter AWS Cloud Watch Logs on a hash on the main page?

耗尽温柔 提交于 2020-01-16 09:05:26
问题 How can I go directly to the log 7cf2c033bfec48e8a74c40b08cdxx15f from the main Cloud Watch logs page filter? This is the one that filters out log groups. Here is the message Failed to create resource. See the details in CloudWatch Log Stream: 2019/08/22/[$LATEST]7cf2c033bfec48e8a74c40b08cdxx15f Now I want to use the hash to find the log group and the log stream 回答1: You can do it with Logs Insights. On CloudWatch Console, navigate to Insights on the left panel (just under logs). Click the

SQS Cloudwatch Sanity

拟墨画扇 提交于 2020-01-13 19:36:08
问题 I'm analyzing a recent load event on my SQS consumer service and am stuck with some SQS Cloudwatch metrics that don't make sense to me. Essentially, it looks like the queue was getting overloaded with messages that aren't accounted for in the metrics. Let me start by summarizing the data in a selected 5 minute period: ApproximateNumberOfMessagesVisible: 215,686 -> 233,605 (gain of 17,919 for this period) ApproximateNumberOfMessagesNotVisible: 2,239 -> 2,129 (loss of 110 for this period)

Unable to use ec2 cloudwatch logs on windows 2016

僤鯓⒐⒋嵵緔 提交于 2020-01-07 03:17:06
问题 I added a \Program Files\Amazon\SSM\Plugins\awsCloudWatch\AWS.EC2.Windows.Cloudwatch.json file as explained to my user-data startup and restarted the ssm service as explained in the documentation for windows 2016. There are no errors in the ssm agent log. However, I do not see AWS.Cloudwatch.exe running, and no logs make it to cloudwatch. I am really interested in just the application and system event logs and the \programdata\amazon\ecs\log directory. If I get that working, I will add the