Questions tagged [aws-cloudwatch-log-insights]

301 questions
0
votes
0 answers

Fetch count cloudwatch log using node js for a specific date range

Howto get the count ?, i have check the query in cloud watch Insights i got output , can any one help me async function main(){ const logGroupName = '/aws/apprunner/'; const timestamp = new Date(); let queryCount…
0
votes
1 answer

How to find difference of timestamps in AWS cloudwatch log insights?

I have cloudwatch log message "LogMonitor" from lambda log group which has all properties to apply filter. It have two timestamps, startTime and endTime and I want to find the difference (endTime - startTime) to know the response time of the…
0
votes
0 answers

AWS cloudwatch MSK metrics -> Firehose

I want to stream some metrics from the namespace AWS/Kafka to Kinesis Firehose and from there to a third-party application. When I choose the namespace AWS/Kafka, I stream all the metrics from this namespace and it's a ton of data that I don't…
0
votes
1 answer

CloudWatch Dashboard with Log Insight Query using Serverless

I have manually created from aws console a CloudWatch Dashboard which contains few widgets from Log Insights Queries. I want to create the same using code (mainly using serverless package). I have found only this serverless plugin related to…
0
votes
1 answer

AWS Cloudwatch Insights: query using multiple log groups

Reading the documentation seems that is possible in AWS Cloudwatch to run queries with multiple log groups but I can not see any example on how to do it. I would like to join two log groups using common attributes and select some logs using…
0
votes
1 answer

AWS CloudWatch logs in multiple regions

I created a lambda function in us-east-1 and sns topic to send notifications to a slack channel. Now I also want to use logs from a service in us-west-2 to trigger the notifications but I can't because they are in different regions. Whats the best…
0
votes
0 answers

How to count and compare odd and even entries in log message in Cloud Watch

I have a aws cloud watch logs in current format: CloudwatchEntries: Test { "identifier": "8982", "IsActiveFlag": false } CloudwatchEntries: Test { "identifier": "8982", "IsActiveFlag": true } CloudwatchEntries: Test { "identifier":…
0
votes
1 answer

How to search for a logs that raised metric alarm in AWS?

I have working AWS cloudwatch alarm form lambda configured in the way: Namespace: AWS/Lambda Metric name: Errors Statistic: Sum Error: 5min For conditions with static threshold >= 1 Got the alarm triggered and I cannot find what caused it to rise in…
0
votes
0 answers

CloudWatch Logs Insights query, How to return only last request set of data

Having this AWS Cloudwatch Logs Insights query: fields @timestamp as ``invoke time``, @requestId, id, name, status, nextStatus, nextStatusDelay | filter @message like /nextStatusDelay/ | filter @message not like /handlerObject/ | sort ``invoke…
0
votes
0 answers

Difference in two pattern of cloudwatch logging to understand pricing

Lets say I have 10 lines of data with 1000 byte in each line. What is the difference in cost incurred if I log in the following pattern. All 10 lines is logged in single entity in cloudwatch logs. i.e. only 1 entry is created in it Each of 10 line…
0
votes
1 answer

AWS API Gateway: How is 4XX and 5XX errors logged in cloudwatch? Example find Status Code 413, Request Entity too large error is logged in Cloudwatch?

I am getting a Status Code 413, Request Entity too large error while calling the api gateway->Lambda Setup. i wanted to quickly check what time this error happened and find it in Cloudwatch. I see the errors are 4XX and 5XX in my API monitoring but…
0
votes
0 answers

In cloudwatch how to group by key inside a nested json?

For example [{ "date" : "xx", "user" : "user1", "hostname" : "hostname1", "ostype" : "os1", "package" : { "smplepackage" : "v3", "package2" : "v2", "package3" : "v5", "package6" : "v10", "package5" : "v11", …
0
votes
0 answers

Cloudwatch Log Agent Issue

I have been working on this Cloudwatch Log Agent for long time but never faced the below issue: Actually, I did some changes in the Cloudwatch agent JSON file: /opt/aws/amazon-cloudwatch-agent/bin/config.json After doing the changes the log export…
0
votes
1 answer

Does AWS X-ray or CloudWatch capture the HTTP response header Content-Encoding?

I have an application hosted in AWS which looks to occassionally give responses which have the following header and value. It is not all the time, which is what I find odd. Content-Encoding: gzip What I would like to know is whether I can use either…
0
votes
0 answers

AWS LogInsight - Get aggregate from another agrregate

I'm using stats to get per second count. How can I aggregate these per second results to a longer period e.g. max over of that per second value over 1 hour period? filter (@message like /Http Method:PUT/ OR @message like /Http Method:POST/) |stats…