Questions tagged [aws-cloudwatch-log-insights]

301 questions
4
votes
1 answer

AWS CloudWatch Insights - Simple Ternary IF or some similar function

Considering that I have many attributes with time measurements in my logs. I want to count how many times each of them is bigger than my timeout limit, 10 seconds for example. I currently am able to do this running many times very similar queries…
Thiago Mata
  • 2,825
  • 33
  • 32
4
votes
2 answers

Get controller name and java service path in controller advice

Hi All i have created a global exception handler in my spring boot app and writing the exception occurred in AWS cloudwatch below code working fine i am able to write the exception in cloudwatch but the challenge is i am unable to get the…
4
votes
2 answers

AWS CloudWatch Logs Insights - Group logs by API resource names and make aggregations

I have AWS API Gateway with two resources: /api/orders /api/history And I have enabled CloudWatch logs for that API. Using AWS CloudWatch Logs Insights I'm able to collect and observe logs from log groups related to the mentioned API. I'd like to…
3
votes
0 answers

Serilog loggs only first log to cloudwatch. Need to log all logs

using Amazon.CloudWatchLogs; using Serilog.Sinks.AwsCloudWatch; internal class Program { static async Task Main(string[] args) { Log.Logger = new LoggerConfiguration() .WriteTo.AmazonCloudWatch( logGroup:…
3
votes
0 answers

How can I parse objects from @message in AWS' Logs Insights?

I have log entries in the following format: 2022-07-14T15:08:05.372Z ffcb7ee9-0e73-42d9-a236-d90fb1dfb131 ERROR {"level":"error","timestamp":"\"2022-07-14T15:08:05.372Z\"", ..., "log":"{\"message\":{\"statusCode\":400, ...} So it is basically:…
3
votes
1 answer

Parse message in CloudWatch Logs Insights

Here are two example messages of the lambda: WARNING: Field Value @ingestionTime 1653987507053 @log XXXXXXX:/aws/lambda/lambda-name @logStream 2022/05/31/[$LATEST]059106a15343448486b43f8b1168ec64 @message 2022-05-31T08:58:18.293Z…
3
votes
0 answers

Is there any way to show another field that I don't want to stats by on cloudwatch logs

I'm trying to write a query for our cloudwatch log insights so I can see more information based on errors. The query I wrote is this: FIELDS coalesce(error.message, err.message) as errorMessage, coalesce(error.type, err.type) as…
3
votes
1 answer

searching key / value pairs in CloudWatch Insight for WAF logs

So, the AWS Cloudfront WAF logs get sent to AWS Cloud Insights. How can I search the random placement of the key / value pairs for the httpRequest array? Example log looks like this: httpRequest.headers.0.name host httpRequest.headers.0.value…
3
votes
0 answers

AWS Cloudwatch multiregion logs insights

I'm using AWS Cloudwatch Logs Insights to query loggroups. Now I implemented the application to the additional region. Is it possible to query loggroups from more than one region at once? Thanks
3
votes
0 answers

AWS CloudWatch Logs Insights concatenation values

I would like to move val2 from second row to first row and show just one row for this @timestamp value. There are have same @timestamp value. What I have for…
3
votes
0 answers

Add fields to expanded AWS CloudWatch log insights

For my logs I parse the @message field to extract relevant data and display that in the log insights, however if you expand a row you get a list of fields & values which only shows the default ones of: @ingestionTime, @log, @logStream, @message &…
3
votes
0 answers

CloudWatch Logs Insights query syntax: How can I dynamically assign categories for a multi-line chart visualization?

I want to visualize the memory usage of unique Lambda instances by plotting multi-line charts in Logs Insights. I can access logStream ID in my Logs Insights query using @logStream I'd like to be able to plot a line showing memory usage for each…
3
votes
0 answers

AppSync 4XX Errors

How to capture AppSync 4XX errors & 5XX errors in CloudWatch log insights. I've setup an alert for both these metrics and getting frequent alarms but couldn't get the pattern to query the logs in log insights. Tried checking for Status code in the…
3
votes
0 answers

How can I show console.log over Aws Cloudwatch + Elastic Beanstalk

I have a simple form created and that having one function to console.log all the field values. How can I get these logs to appear on AWS Cloudwath ? My form -
3
votes
0 answers

AWS Container Insight on ECS have a big delay (~2/3mins)

I've setup container insight on a ECS cluster running Fargate. I'm experiencing quite big delay to get metrics into AWS Container. When looking at the metric log /aws/ecs/containerinsights/{cluster_name}/performance, in log insight: I can see delay…
FredG
  • 712
  • 7
  • 10