Questions tagged [aws-cloudwatch-log-insights]
301 questions
1
vote
1 answer
How do I parse by regular expressions only on filtered lines on Cloudwatch log insights?
Is there a way to restructure this cloudwatch insights query so that it runs faster?
fields @timestamp, @message
| filter @message like /NewProductRequest/
| parse @message /.*"productType":\s*"(?\w+)"/
| stats count(*) group…

eshalev
- 3,033
- 4
- 34
- 48
1
vote
0 answers
Can I see if cloudwatch logs has been rejecting any of my events (due to event size)
I use cloud watch logs to view my backend's output to console.log(). Recently some events have started not appearing (events where I am logging large objects). Is there any way for me to see what events cloud watch has rejected.
If I could see the…

friartuck
- 2,954
- 4
- 33
- 67
1
vote
1 answer
Parsing logs in Cloudwatch insight
I am trying to parse the following log using cloudwatch insights.
2021.10.25 19:56:20:459 UTC | Info | HTTP | GOOGLE_cf95a06b-b5fa-4f70-bc18-28fc30dfd9cc
Tx [http] 200.61.132.110:80 -> 200.61.132.89:31812 StatusCode=200
Insight…

user391
- 105
- 1
- 12
1
vote
1 answer
Parse message in Log Insight
I want to parse this message :
[2021-08-30T14:01:01.443908+00:00] technical.INFO: Webhook
"239dfb55-c8f3-4ae2-8974-22dadb7417ba" (wallet.create) has been
handle.
To have :
UUID (here : 239dfb55-c8f3-4ae2-8974-22dadb7417ba)
The words in brackets…

Mitsukk
- 314
- 2
- 13
1
vote
0 answers
Get Id from cloudwatch?
In the Cloudwatch log, it has been logged like this via Lambda:
START RequestId: 14699111-bd51-11fa-9dfd-00eee6d18c52
OrderId: 111111
Task: Create
ERROR OrderId: undefined
END RequestId: 14699111-bd51-11fa-9dfd-00eee6d18c52
START RequestId:…

I'll-Be-Back
- 10,530
- 37
- 110
- 213
1
vote
0 answers
Best way to parse CloudWatch log and upload the results to s3
I'm trying to parse a log group and filter some information I need and then upload it to s3. I did some research and I have the following two approaches:
By using subscription filter which means I can create another lambda function to subscribe the…

noobie2023
- 721
- 8
- 25
1
vote
1 answer
trying to showcase ratios in AWS Logs Insight query not working
I am trying to generate a graph that will display the success/failure rate of an operation. In my application I am pushing log events in the following format:
[loggingType] loggingMessage.
I want to create a pie chart that shows the ratio of…

Sina
- 11
- 2
1
vote
1 answer
CloudWatch logs insights strcontains not working
I have a CloudWatch log group where all the logs are JSON objects that look like
{
"job-name": "bb0e964b-a7f8-41e3-b1fc-8de4306c0b84",
"event-name": "PERSIST_LAMBDA_INVOKED",
"log-message": "Persistence lambda invoked for line 238."
}
I'm…

Pranav Rudra
- 13
- 3
1
vote
1 answer
Cloudwatch Insights query to return the find first AND last results only
I have a query that returns a number of results that show the start and end of transactions in the logs. So for every transaction there's a "start" and an "end" log entry.
fields @timestamp, @message
| parse @message "*: *" as logContext,…

DaBozUK
- 590
- 1
- 8
- 24
1
vote
1 answer
How do I find error logs for my Python lambda function across many AWS Cloudwatch log streams?
Let's say I have log group /aws/lambda/backend, which tracks logs of my Python lambda function.
I want to debug common issues, like exceptions and time outs, and find related log entries.
But the function has a lot of concurrent traffic, so there…

Oleksii Donoha
- 2,911
- 10
- 22
1
vote
2 answers
List all LogGroups using cdk
I am quite new to the CDK, but I'm adding a LogQueryWidget to my CloudWatch Dashboard through the CDK, and I need a way to add all LogGroups ending with a suffix to the query.
Is there a way to either loop through all existing LogGroups and finding…

khave
- 23
- 2
- 6
1
vote
2 answers
AWS CloudWatch filter @LogStream in Logs Insights
Is there a way to filter in a widget only the @LogStream s which do not contain a specific log message?
I tried to use a Log table with some filters as presented…

Keb
- 11
- 1
- 3
1
vote
1 answer
Looking for a better way to count the 5 minute request rate of an API
I'm trying to use AWS CloudWatch Logs Insights to count the number of requests coming from each IP address within 5 minutes of an API.
Here's an example of the data I want to get.
Time Range: 01:05 - 01:10
Request Source
Number of…

Brian
- 12,145
- 20
- 90
- 153
1
vote
1 answer
What is the cloudwatch insights logs equivalent of SQL's "WHERE IN ('foo', 'bar')"
This is not valid:
fields @timestamp, log
| sort @timestamp desc
| filter kubernetes.pod_name like /my-pod/
| filter log.someId IN (156446, 156447, 156448, 156449, 156450, 156451, 156453, 156454, 156455, 156456, 156457, 156458, 156459, 156460,…

JonTroncoso
- 791
- 1
- 8
- 22
1
vote
0 answers
CloudWatch Insights: Filter field contents if matches contents of another field
I'm trying to compare the contents of one ephemeral field to those of another within CloudWatch Logs Insights. The contents are "CompanyRequestID"s, parsed from the log stream @message, and the @requestId in the lambda Report. The requestIds are…

ABails
- 41
- 1
- 6