1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
You could write a python or other script in Lambda or off platform to query the cloud watch logs and then do the calculation between the two timestaps.
def lambda_handler(event, context):
client = boto3.client('logs')
# Specify your log groups
log_group1 = '/aws/lambda/your_lambda_function1'
log_group2 = '/aws/lambda/your_lambda_function2'
....... other code
response1 = client.start_query(
logGroupName=log_group1,
startTime=start_timestamp,
endTime=end_timestamp,
queryString='fields @timestamp, @message | sort @timestamp desc',
)
.... query other log....
calculate difference in time stamps
답변함 일 년 전
Thankyou for the suggestion, sure I will try that. I guess doing it from the query will be easier, if you have a way to do it from query itself please let me know