amazon-cloudwatch

Can AWS CloudWatch alarms be paused/disabled during specific hours?

萝らか妹 提交于 2019-11-30 11:59:07
I want to automatically toggle alarms on/off during specific periods of time so that they do not fire during maintenance windows. I'm doubting that an easy or direct method exists since I could not find such a thing in the documentation. Does anyone know of a different approach to achieve this while still using CloudWatch alarms, or did I miss an obvious solution? It's not automatic but it can be done: http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_EnableAlarmActions.html What you want to do is: right before the maintenance window starts you Disable the alarm actions. As

Amazon Cloudwatch Logs Insights with JSON fields

匆匆过客 提交于 2019-11-30 11:42:02
I am trying to use Logs Insights with data containing JSON in one of the fields, and to parse the JSON fields My data looks like the following when I put it in insights with the starter code fields @timestamp, @message | sort @timestamp desc | limit 25 How can I easily extract the path variable in my nested JSON to perform aggregations on it ? By looking at some documentation, I thought @message.path would work but it does not seem so. Has anyone successfully interpreted JSON logs in Insights EDIT : Sample of what my data looks like # @timestamp @message 1 2018-12-19 23:42:52.000 I, [2018-12

How to monitor free disk space at AWS EC2 with Cloud Watch in windows

时光怂恿深爱的人放手 提交于 2019-11-30 09:23:56
I want to make alarm in case that there is 10% left in my disk space. I read some articles of how monitoring free disk space with Cloud Watch but I think it seems to be only for linux. Do you have any solution for monitoring free disk space for windows? Thanks in advance. This is how to configure a Windows 2016 EC2 instance to report free disk space (or any other performance counter on your server) Download a sample AWS.EC2.Windows.CloudWatch.json file. This is where I found one. https://s3.amazonaws.com/ec2-downloads-windows/CloudWatchConfig/AWS.EC2.Windows.CloudWatch.json Copy the sample AWS

AWS Cloudwatch Log - Is it possible to export existing log data from it?

我们两清 提交于 2019-11-30 05:38:57
I have managed to push my application logs to AWS Cloudwatch by using the AWS CloudWatch log agent. But the CloudWatch web console does not seem to provide a button to allow you to download/export the log data from it. Any idea how I can achieve this goal? The latest AWS CLI has a CloudWatch Logs cli, that allows you to download the logs as JSON, text file or any other output supported by AWS CLI. For example to get the first 10,000 log entries from the stream a in group A to a text file, run: aws logs get-log-events \ --log-group-name A --log-stream-name a \ --output text > a.log The command

Monitoring memory usage in AWS CloudWatch for Windows instance

扶醉桌前 提交于 2019-11-30 01:00:05
问题 By default, memory usage isn’t monitored by CloudWatch. So I tried to add it to my Windows instance in AWS using these instructions. This is what I did: I created a user named custom-metrics-user . Then I stored the access and secret key. I created and attached an Inline Policy to the user. it looks like this: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["cloudwatch:PutMetricData", "cloudwatch:GetMetricStatistics", "cloudwatch:ListMetrics", "ec2:DescribeTags"],

Amazon Cloudwatch Logs Insights with JSON fields

旧城冷巷雨未停 提交于 2019-11-29 16:51:13
问题 I am trying to use Logs Insights with data containing JSON in one of the fields, and to parse the JSON fields My data looks like the following when I put it in insights with the starter code fields @timestamp, @message | sort @timestamp desc | limit 25 How can I easily extract the path variable in my nested JSON to perform aggregations on it ? By looking at some documentation, I thought @message.path would work but it does not seem so. Has anyone successfully interpreted JSON logs in Insights

How to monitor free disk space at AWS EC2 with Cloud Watch in windows

僤鯓⒐⒋嵵緔 提交于 2019-11-29 13:39:58
问题 I want to make alarm in case that there is 10% left in my disk space. I read some articles of how monitoring free disk space with Cloud Watch but I think it seems to be only for linux. Do you have any solution for monitoring free disk space for windows? Thanks in advance. 回答1: This is how to configure a Windows 2016 EC2 instance to report free disk space (or any other performance counter on your server) Download a sample AWS.EC2.Windows.CloudWatch.json file. This is where I found one. https:/

AWS IAM Policies to connect AWS Cloudwatch Logs, Kinesis Firehose, S3 and ElasticSearch

北战南征 提交于 2019-11-29 03:29:31
问题 I am trying to stream the AWS cloudwatch logs to ES via Kinesis Firehose. Below terraform code is giving an error. Any suggestions.. The error is: aws_cloudwatch_log_subscription_filter.test_kinesis_logfilter: 1 error(s) occurred: aws_cloudwatch_log_subscription_filter.test_kinesis_logfilter: InvalidParameterException: Could not deliver test message to specified Firehose stream. Check if the given Firehose stream is in ACTIVE state. resource "aws_s3_bucket" "bucket" { bucket = "cw-kinesis-es

AWS Cloudwatch Log - Is it possible to export existing log data from it?

邮差的信 提交于 2019-11-29 02:08:23
问题 I have managed to push my application logs to AWS Cloudwatch by using the AWS CloudWatch log agent. But the CloudWatch web console does not seem to provide a button to allow you to download/export the log data from it. Any idea how I can achieve this goal? 回答1: The latest AWS CLI has a CloudWatch Logs cli, that allows you to download the logs as JSON, text file or any other output supported by AWS CLI. For example to get the first 10,000 log entries from the stream a in group A to a text file

Specify log group for an AWS lambda?

橙三吉。 提交于 2019-11-26 19:56:51
问题 Is there a way to specify the CloudWatch log group that an AWS lambda logs to? It seems to be generated directly from the lambda name; however, it would be especially convenient to, for example, aggregate multiple lambdas to a single log group. We are especially interested in specifying the log group when the lambda is created by a CloudFormation template. 回答1: I don't think that is possible. Even if it were possible, each AWS Lambda instance would still write to its own log-stream. And