Questions tagged [aws-cloudwatch-log-insights]
301 questions
0
votes
0 answers
Pushing logs to cloudwatch from spring boot application with role based access
This is my requirement - I need my spring boot application to push all logs to cloudwatch using log appenders. I will be giving the key, secret, log group and stream in application.properties.
Current Setup:
I have 2 appenders in my…

Gayathry S
- 91
- 11
0
votes
0 answers
Multiple stats commands are not allowed (Cloudwatch Logs Insights)
With AWS Cloudwatch Log Insights I am getting the clients with # of checks less than 50, executing the following query works and I get the following output
fields @timestamp, @message
| sort @timestamp desc
| parse @message…

Luis Felipe Vaca
- 1
- 1
0
votes
0 answers
No csm configuration found
I am using the following steps in ec2 instance ubuntu to push the logs from the server to AWS cloud watch
cloud watch setup
sudo wget https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb
sudo dpkg -i -E…

Nirmal Negi
- 1
- 2
0
votes
1 answer
AWS Cloudwatch log query times out in lambda function
I'm trying to query a log group using a lambda with javascript sdk v3:
export const realTimeQueryString = (route_key: string, account: string) => `fields @timestamp, @message |
filter route_key = "ANY /${route_key}/{proxy+}" and user != "-" …

Øystein Seel
- 917
- 2
- 9
- 30
0
votes
0 answers
In aws cloudwatch log insights, how to filter out logs where a json field contains a specific substring
I've got an AWS Cloudwatch log insights query where I want to filter out log entries where a JSON field contains a substring "DEBUG".
I cannot find this in the documentation and below is a bunch of stuff I've tried without success.
Does anyone know…

Martin Riddar
- 173
- 4
- 16
0
votes
0 answers
Cloudwatch parsing same field from array of objects/records in json in @message
I am finding difficulty to extract all the same fields and it's values from objects where the objects are in
array(array of objects in json).
I tried with |parse @message '"currency":"*"' as currencies
but getting only first match searched(a single…

vinay chopkar
- 1
- 1
0
votes
1 answer
CloudWatch agent is not configured
I have successfully installed CloudWatch agent on my EC2 instance where we are using Apache2.
After configuring my config.json file when I am restarting the CloudWatch agent it showing error:
amazon-cloudwatch-agent is not configured. Applying…

Nirmal Negi
- 1
- 2
0
votes
0 answers
Multiple lines in AWS Cloudwatch Dashboard graph
I've created a query which shows me all requests made by my backend by querying Cloudwatch logs.
fields @timestamp, @message
| filter strcontains(@message, "[RequestStart]: Sending HTTP request")
| stats count(*) as requestCount by bin(1h)
…

David Gregor
- 1,855
- 1
- 13
- 14
0
votes
0 answers
Use output of one AWS Cloudwatch query into another in log insights
I have a use case where I have logs as below:
LINE1 : {id : 123, name : "ABC"}
LINE2 : {id : 123, city : "NYC"}
I want to query the log group and join 2 log lines with id field and get Output as :
{name : "ABC", city : "NYC"}
Is there a way to do…

Divyesh Kalbhor
- 385
- 3
- 19
0
votes
1 answer
How can I organise the output of my CloudWatch Insights query?
I have the following Log insights query that I'm using in CloudWatch to extract memory/cpu related stats:
stats avg(MemoryUtilized) as MemoryUsed, avg(CpuUtilized) as CpuUsed by TaskDefinitionFamily, TaskId, MemoryReserved, CpuReserved, Timestamp
|…

mal
- 3,022
- 5
- 32
- 62
0
votes
0 answers
Get the count of messages on condition in AWS cloud watch
Am trying to get the number of filtered messages in Cloud watch using the insight query like below
fields @timestamp, @message, @logStream, @log
| filter @message like /Message studentInfo processed in/
| parse 'Message studentInfo processed in *…

user3625533
- 339
- 1
- 4
- 20
0
votes
0 answers
How to get all error logs from aws cloudwatch using boto3
I am trying to get all the error logs from aws cloudwatch, to do this I tried looping through all log group names and running this code:
client.start_query(
logGroupName=group, # log group name
startTime = int(creation_time)*1000, # Time…

Glinty
- 15
- 1
- 7
0
votes
0 answers
CloudWatch Insights find duplicates by message and timestamp
I am logging messages in AWS CloudWatch with the following format:
code=CAPTURE order={nnnnn}, where nnnn is a numeric value.
Is it possible to find all messages which have the same order value (duplicates), by taking into consideration that they…

Valip
- 4,440
- 19
- 79
- 150
0
votes
0 answers
retrieve fields from logs based on a condition from AWS cloudwatch log insight query
I am storing a message in a log stream of aws. For a particular time interval these are the 2 logs on which I need to write a query which I will run on log insight.
enter image description here
I want to write a query which will return the differnce…

Rishabh Shukla
- 1
- 1
0
votes
0 answers
combine results from two queries in aws cloud watch insight
I am trying to query my log in aws cloud watch and have a case where i would like to combine logs from different places and display them properly.
i have two queries:
Query1:
fields @timestamp, RunId, Object, System1Duration
| filter RunId = "ID1"…

anyavacy
- 1,618
- 5
- 21
- 43