Questions tagged [amazon-cloudwatch]

1

votes
2

answer
334

Views

get the Alarm object of CloudWatch using boto 2

I created an alarm and want to delete it afterward... The documentation for boto 2 doesn't show how to do that. Any help ? Thanks
Sam Gomari
1

votes
1

answer
198

Views

AWS CodePipeline Notifications

I am trying to add some notifications to my Pipeline in AWS. I have a build stage where I use AWS CodeBuild and I want to receive an email whenever the build fails. I have followed the tutorial that amazon offers and it works fine to notify me about the failure, but I can't seem to find how to ad...
Yuri Azar
1

votes
1

answer
172

Views

AWS CloudWatch GetMetricsData: “Sum” misses points on periods without values

I am querying GetMetricsData from AWS CloudWatch: { StartTime: lastWeek , EndTime: today, MetricDataQueries: [ { Id: 'invocations', Label: 'Invocations', MetricStat: { Metric: { Dimensions: [ { Name: 'FunctionName', Value: /* FunctionName */, }, ], MetricName: 'Invocations', Namespace: 'AWS/Lambda'...
Matthieu Napoli
1

votes
1

answer
24

Views

Is it possible in AWS to subscribe to EC2 created/started/stopped/terminated events?

I have a utility in Lambda which does automatic DNS registration via an intelligent automated process. Instances that are created with a Name tag including XXXXXX and a autodns tag set to true will have Route 53 records created and deleted when these instances are created and deleted. Previously, I...
Naftuli Kay
1

votes
1

answer
614

Views

View CloudFront metrics in CloudWatch dashboard

Is there a way to display CloudFront metrics inside an existing CloudWatch dashboard ? I can view CloudFront distributions metrics in the CloudFront console (Total requests, hit ratio ...) but i cant find theses metrics in CloudWatch dashboards. On the Cloudfront documentation (https://docs.aws.amaz...
JayMore
1

votes
0

answer
320

Views

AWS cloudwatch logs not extracting timestamp from compact json format

I am using AWS cloudwatch logs and configured my application to write the logs in compact json format with sink being rolling file. Below is the sample log from application. {'@t':'2017-12-21T10:00:51.5955080Z','@mt':'Error {@args}','@l':'Error','args':['args','31']} Now the issue i am facing here w...
Parashuram
1

votes
0

answer
54

Views

send sns topic alert when a specific file is uploaded to s3

I want to create a cloudwatch event which will send a sns topic alert when a file starting with SampleSheet is uploaded to a s3 bucket. below configuration creates alert for every object uploaded to s3: { 'source': [ 'aws.s3' ], 'detail': { 'eventSource': [ 's3.amazonaws.com' ], 'eventName': [ 'Pu...
nadish
1

votes
1

answer
209

Views

Event Pattern for creating a rule/trigger (CloudWatch-Lambda) when AWS Step Function `ExecutionsFailed`

When my AWS Step Functions' State Machine fails ExecutionsFailed , I'd like to trigger a lambda function in response to it. Seems that you have to create a rule on CloudWatch; but I couldn't find description on how to do that (in particular how the Event Patterns supposed to look like). p.s. in my c...
Neil
1

votes
0

answer
286

Views

How to use the --profile option with “aws logs” command for the CloudWatch Logs Agent?

After installing the CloudWatchLogs Agent the command /var/awslogs/bin/aws logs push --config-file /var/awslogs/etc/awslogs.conf --additional-configs-dir /var/awslogs/etc/config is running on the machine. To use separate credentials for the CloudWatchLogs Agent a profile was created in /root/.aws. T...
1

votes
0

answer
42

Views

AWS Regional failover with secondary Region having no resources running untill failover happens

I have an application running in N.Virginia Region. I want to configure Regional failover such that if my N.Virgina region or application goes down, same application should come up secondary Region. Initially secondary Region should not have any resources. May be we can only have a CloudFormation te...
Abhizer Saifee
1

votes
0

answer
84

Views

How to set log metric name in cloudformation

I am creating a log metric with cloudformation using the following entry which works. MetricFilter: Type: 'AWS::Logs::MetricFilter' Properties: LogGroupName: 'Services' FilterPattern: 'ERROR There was an error' MetricTransformations: - MetricValue: '1' MetricNamespace: 'AlarmTest' MetricName: 'Error...
JaChNo
1

votes
2

answer
790

Views

How do I correctly use the CloudWatch boto3 API to retrieve data from metrics?

I'm using Python3's boto3 to try to pull data from SQS's metrics using the get_metric_statistics function documented here: https://boto3.readthedocs.io/en/latest/reference/services/cloudwatch.html#CloudWatch.Client.get_metric_statistics This is the code I made to try to pull it: import boto3 import...
Helios
1

votes
0

answer
97

Views

Setting CloudWatch Alarm for SWF Workflow irrespective of version

I have a Cloudwatch alarm set for the SWF workflow for a particular version. But as soon as I change the workflow version that particular alarm becomes useless. Is there a way in cloudwatch to create an alarm on SWF workflow irrespective of the version? Thank You, Prasad
Prasad Pande
1

votes
1

answer
369

Views

Where and how disable dynamodb “missing data” Cloudwatch alarms

In the billing management console, it states that I've used 57.510 alarms. Looking at these alarms, they all come from dynamodb tables and are either INSUFFICIENT_DATA or OK alerts, e.g. INSUFFICIENT_DATA / TargetTracking-table/profile-preferences-AlarmLow-0626754b-aa9a-4883-839b-as4c3c012078 / Cons...
forste
1

votes
0

answer
151

Views

AWS lambda CLI call does not return log messages except standard ones

In a simple 'hello world' example I write to 'console' several messages, like that: Console.WriteLine('Function name: ' + context.FunctionName); Console.WriteLine('RemainingTime: ' + context.RemainingTime); When I call my function from CLI (either with dotnet lambda invoke-function or with Invoke-LM...
Dmitrii Lobanov
1

votes
1

answer
185

Views

Performance counters not showing up in AWS CloudWatch

I'm having issues with getting performance counters to show up in Aws CloudWatch. I followed the steps in this post and below is CloudWatch json file. Anyone can point out what I'm doing wrong? Thank you { 'IsEnabled': true, 'EngineConfiguration': { 'Components': [ { 'FullName': 'AWS.EC2.Window...
KennyT
1

votes
1

answer
242

Views

WebServerHost No default VPC for this user

Im currently trying to launch Cloudwatch and all Alarms from Cloudformation, im using the default template from amazon https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-cloudwatchlogs.html Im struggeling at this point WebServerHost: Type: AWS::EC2::Instance Metadata: Comme...
RedXIII
0

votes
0

answer
5

Views

AWS CloudWatch logstream data completely missing

I am looking for help in troubleshooting a curious CloudWatch issue. I have a CloudWatch logshipping agent setup for /var/log/syslog on Ubuntu. The aws log is full of happy INFO messages such as the following. No errors, no exceptions: The log stream in CloudWatch console is completely empty - no...
Michal
1

votes
1

answer
76

Views

How get metric for elasticsearch node in aws?

Aws provides several metric in cloud watch about es cluster. But how get CPU loading for concrete ES nodes? E.g. it shows, say 40% CPU loading, which is average number for all cluster, but how get such information for all nodes in ES cluster? It there a way to get EC2 InstanceId from elasticsearch c...
Cherry
1

votes
1

answer
31

Views

AWS Backup EBS volume with a name

I have a CloudWatch Rule setup to backup some EBS volumes. It executes fine, but in the EC2 window under snapshots the name column is not populated. Anyone know how I can modify the rule to give a name to each EBS snapshot when the rule executes?
Kelly
1

votes
1

answer
116

Views

CloudWatch not receiving Cloudtrail logs from outside region

I am struggling with detecting activities performed outside of a given region in CloudWatch. For example, if an InternetGateway is created in the same region as the CloudWatch Event (let's say eu-central-1), it is detected by CloudWatch, however if it's somewhere else (let's say eu-west-1) it won't...
Adrien Merlier
1

votes
1

answer
306

Views

How to perform AWS CloudFormation autoscaling for ECS instance when cluster has insufficient memory available

I have created CloudFormation template that creates ECS service and task and has autoscaling for tasks. It is pretty basic - if MemoruUtilization for tasks reaches certain value then add 1 task and vice verse. Here are some of the most relevant parts form template. EcsTd: Type: AWS::ECS::TaskDefinit...
Kārlis Janisels
1

votes
0

answer
120

Views

Any useful Cloudwatch metrics for Kinesis Firehose (in addition to Kinesis Stream)?

I am creating a dashboard of monitors/metrics of my team's service, which utilizes a Kinesis Stream and Kinesis Firehose to get our data from EDX to our S3 bucket. I've identified a few useful Kinesis Stream metrics on Cloudwatch, particularly: IncomingRecords ReadProvisionedThroughputExceeded Write...
Louis
1

votes
0

answer
40

Views

Unparseable date error while inserting into dynamodb?

I am doing a small POC in AWS. I trying to read a csv file from S3 bucket and need to insert those csv file data into dynamodb. Everything is going fine but while iterating csv file data in the first row itself it is getting terminated. I have created one table i.e vehicledata inside dynamodb with...
Binay Kumar
1

votes
0

answer
182

Views

AWS Lambda: Monitoring lambda timeout that was triggered by SNS.

I have an AWS Lambda that was triggered by SNS message. Many time, it has reached the max duration allowed by AWS, and AWS killed it immediately. I have to either dig into the Lambda logs or the lambda duration chart to find out about the error. Are there a better way to report this kind of errors...
user1187968
1

votes
0

answer
45

Views

I want to trigger a lambda for CLoudform status in cloudwatch events. So that I can send the stack details transfer to API

import boto3 cloudformation = boto3.resource('cloudformation') def lambda_handler(event, context): print(event) event = cloudformation.Event('id') return 'Hello from Lambda' I want to trigger a lambda for CLoudform status in cloudwatch events. So that I can send the stack details transfer to the...
Vasu R
1

votes
0

answer
139

Views

AWS Cloudwatch DatabaseConnections metric differs to mysql Threads_connected

In our mysql RDS database on AWS, I can see the number of database connections by going into CloudWatch Metrics and selecting the DatabaseConnections metric. It reports 13, which is as expected: 2 Docker containers containing our app are pointing to the database container. Each app has 2 database co...
1

votes
1

answer
682

Views

Best way to implement AWS ECS healthcheck

I'm implementing ECS health-check functionality and and I'm thinking about the best way to do that. For now I have found several solutions: Using AWS ECS metrics and Dimensions and check whether some metric has insufficient value Using CloudWatch Alarm: ECSHealthAlarm: Type: AWS::CloudWatch::Alarm...
Serhii Dykyi
1

votes
0

answer
147

Views

CloudWatch Logs agent stopped sending data from Jenkins log

My cloudwatch logs stop sending data from the logstream i created for the jenkins.log. The error i am getting in /var/log/awslogs.log is the following code Traceback (most recent call last): File '/var/awslogs/bin/aws', line 27, in sys.exit(main()) File '/var/awslogs/bin/aws', line 23, in main ret...
maltamash
1

votes
0

answer
52

Views

Running a Task with CloudWatch Events with Environment Parameters

I know how to schedule a task to be run in the future with a solution like the one described in Running an ECS Task on a Schedule With .NET. The actual task is a Docker image and I would like to pass it some arguments using the environment variables. Is this possible at all? If not, how can I pass a...
Ricardo Peres
1

votes
1

answer
138

Views

How can I attach SNS notification to aws_appautoscaling_policy for ECS target tracking in terraform?

If I have the following terraform, and an SNS topic ARN available, is there a way to attach a cloudwatch notification event to the alarms that AWS creates under the covers? resource 'aws_ecs_service' 'service_definition' { name = '${var.servicename}' cluster...
Steve
1

votes
1

answer
226

Views

How can I codify Cloudwatch alarms used by Elastic Beanstalk?

I've been codifying some AWS infrastructure with Terraform. We have a web application deployed to Elastic Beanstalk, and I've been trying to add aws_cloudwatch_metric_alarms to it. I can do this fine - by setting the AutoScalingGroupName dimension to that of the Beanstalk environment, it correctly c...
soapergem
1

votes
1

answer
32

Views

Which AWS service to log user application interaction events via Lambda, maybe Cloudwatch?

We are developing an API server (graphql, prisma, node) running in a Lambda (deployed via Apex Up). We'd like to log some user events such as: Login success Login failure User took action X Currently, we just log these in our app's Aurora DB through the main API's access to the db. This results in...
k00k
1

votes
0

answer
153

Views

AWS ecs scheduled task with cloudwatch

I am trying to create scheduled task with cloudwatch. I am using this page https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html The problem i see is when i run task normally then aws asks vpc subnets Launchtype BUT when i use cloudwatch target then it...
Mirage
1

votes
1

answer
56

Views

AWS Cloudwatch Events on Scaling In(Shutting-Down) Instance

I created Cloudwatch Event Rule that listens to EC2 Instance-terminate Lifecycle Action and executes an EC2-RUN Command on the instance with the tag specified on the event rule. Now my question is that for example, my run command script will take 30 mins to complete is the instance will wait for the...
1

votes
1

answer
134

Views

How to setup cloudwatch metrics for dynamically created resources in auto-scaling group

We have some auto-scaling groups and would like to add metrics for members of that to our cloudwatch dashboard / alarming. In particular, we would like to know the metrics of the EBS (e.g. BurstBalance) attached to the instances of a certain auto-scaling group. These metrics should of course be upda...
StegSchreck
1

votes
1

answer
1.4k

Views

User is not authorized to perform: SNS:CreateTopic on resource

I wanted to monitor certain parameters (TotalErrorRate and Latency) with CloudWatch and I wanted a 'Simple Notification Service' (SNS) to send me an email, when an (cloudWatch) alarm is thrown: EscalationTopic: Type: 'AWS::SNS::Topic' Properties: DisplayName: My Monitoring Subscription: - Endpoint:...
thadeuszlay
1

votes
2

answer
828

Views

How to change the default subject line for SNS in Cloudwatch?

I have setup a rule in cloudwatch to monitor Glue ETL. In the state change I am sending a notification to SNS. I have modified the input transformer to get a custom body of the email but not getting how to change the subject line of the email . It still giving the default 'AWS Notification Message'...
Surajit Kundu
1

votes
0

answer
267

Views

Warming Lambda Function with Cloudwatch schedule rules

I'm trying to warm a lambda (inside VPC which access a private RDS) function with cloudwatch. The rate is 5 minutes (only for experimental) I intend to make it 35 minutes later on. After I saw the cloudwatch logs which indicate that the function has been called (and completed which I have set up a c...
kkesley
1

votes
0

answer
226

Views

AWS CloudWatch Log stream not found

I have some AWS EC2 instances logging to CloudWatch Log Groups. When I open a Log Group, I can see my log streams listed: However, when I click on one of the streams, I get an error: Log stream not found The log stream version_0.2.41 date_2018-06-25 instance_i-02962ec6fbfd20c4c could not be found. C...
fikkatra

View additional questions