Questions tagged [aws-cloudwatch-log-insights]
301 questions
1
vote
0 answers
How to trigger Cloudwatch Alarms from Coudwatch Insights Queries?
How do I trigger Cloudwatch Alarm based on output of Cloudwatch Insights queries?
SELECT CPUUtilization
FROM SCHEMA("AWS/EC2", InstanceId)
WHERE CPUUtilization > 80
GROUP BY InstanceId
For every record in the above query output, I would like…

Biju
- 820
- 1
- 11
- 34
1
vote
0 answers
Unable to break items within dictionary in AWS Cloudwatch
I am trying to parse AWS Cloudwatch logs, which has error logs as follows
[ERROR] timestamp requestID message1 {'A', 'B', 'C'} message2.
[ERROR] timestamp requestID message1 {'A'} message2.
[ERROR] timestamp requestID message1 {'A'} message2.…

Hardik Gupta
- 4,700
- 9
- 41
- 83
1
vote
1 answer
adding metric pattern in cloudwatch dashboard json
so I have created custom dashboard in AWS cloudwatch using json
{
"height": 6,
"width": 6,
"y": 54,
"x": 0,
"type": "metric",
"properties": {
"view":…

Queen Anonymous
- 35
- 3
1
vote
1 answer
AWS Log Insights replace absent value with 0
I want to track p99 and p95 for my serverless application.
Standard queries present in the documentation suggest the usage of @billedDuration/ @duration.
So the query would look like :
stats pct(@duration, 99)
This does not fit my scenario since…

Kancha
- 409
- 1
- 3
- 11
1
vote
0 answers
Filtering by matching / non matching attributes on AWS Insights
I am trying to search for messages on AWS Insights with either matching or non matching attributes.
Specifically, Suppose I have an attribute "resp" and I want to search for messages which do not contain att.resp. Is something like that even…

mousomer
- 2,632
- 2
- 24
- 25
1
vote
0 answers
Cloudwatch logs for getting insights only on weekdays
I need to get cloudwatch log insights for spot terminations on only few days of the week (ex: Friday, saturday, sunday and monday). For last 3 months, I need to get the insights, entire date range can be selected through UI, but I need to filter…

Santhosh
- 71
- 1
- 5
1
vote
0 answers
log groups and log stream name question for aws glue
I have a glue job that is developed in my account and i had ran it multiple times and corresponding logs are available in aws/awsglue/ log streams in cloud watch . But there are other developers also developing glue jobs, which makes me very hard to…

Data girl
- 101
- 1
- 7
1
vote
1 answer
Cloudwatch insights, query to graph by value of JSON values?
I've got a JSON object in my logs that shows up as the following:
"result":{
"totalRecords":8,
"bot":3,
"member":5,
"message":0,
"reaction":0,
"success":0,
"error":0,
"unknown":8
}
I'm trying to write a logs insights query…

Joseph Toronto
- 1,882
- 1
- 15
- 29
1
vote
1 answer
Get corresponding lambda log stream for statemachine execution
statemachine logs for a specific execution can be easily queried in cloudwatch via the execution_arn field in the log events.
However how can i find out which logs/logstreams of the LAMBDA functions correspond to which statemachine execution? I…

Julian Dm
- 363
- 2
- 17
1
vote
1 answer
AWS Lambda - Source of Errors?
AWS Lambda provides a CloudWatch/All Metrics/ Dashboard called "Error count and success rate (%)".
The link to this Dashboard is available from AWS Lambda/Dashboard/Error count and success rate (%)/View in metrics. Tip click the hamburger in the…

jono2010
- 602
- 1
- 7
- 13
1
vote
0 answers
Cloudwatch insight query automate endtime and start time
I am trying to automate generation of a report based on an insight query, every Monday for the past week. I need to run an insight query every Monday as a cron job. Could someone guide me on how I could automate setting the end time and start time…

raosa
- 119
- 1
- 8
1
vote
1 answer
Is there a way to sort logs in AWS Log Insights the same way they appear in the log file?
I have a query in Log Insights that prints some messages from the web.stdout.log file and sorts them by @timestamp.
When the timestamp is the same for two messages, it prints them with no order.
Is there any way to sort the messages by the same…

Angela
- 51
- 5
1
vote
0 answers
Indexing with CloudWatch Logs Insights
a question relevant to the one here:
I'm trying to figure out how to capture records of a certain indexed difference when querying CWLI. Specifically, I need to find the record after each occurrence of an exception (yes, I know the below is an…

StackPro_1111
- 49
- 5
1
vote
4 answers
AWS Cloudwatch Log Insights - replace string function
How do I use AWS Cloudwatch Log Insights' replace function?
The docs do not give working examples.
Given logs which contain paths such as /api/lumberjack/123/axe/456/fashion
I am trying:
fields message
| parse message "path=* " as path
| fields…

xxjjnn
- 14,591
- 19
- 61
- 94
1
vote
0 answers
AWS Log Insights query with string contains and return string value as alias
I have below query to get data from cloudwatch log :
fields @timestamp, @user, @fileName, @fileType, strcontains(@message,'downloaded') or strcontains(@message,'unauthorized') as status
| parse @message /(?<@user>(?<=User\s).*(?=\shas))/
| parse…

Nilesh Gupta
- 71
- 2
- 8