You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fornamein buildkite-agent system lifecycled docker-daemon;do
63
+
aws logs get-log-events \
64
+
--log-group-name "/buildkite/$name" \
65
+
--log-stream-name "$instanceId" \
66
+
--output "$outputFormat" \
67
+
>>"$dir/$name-$instanceId.log"
68
+
done
67
69
68
70
# CloudWatch stores the creationTime as milliseconds since epoch UTC.
69
71
# Since macOS doesn't support calculating the time since epoch in milliseconds, we don't have perfect accuracy on this, but it should be as close to 24 hours as possible
72
+
# while still being inclusive to all platforms that might run the script
73
+
70
74
# Currently only collects the last 24h of logs, but it might be good to be able to specify a different value for this.
71
75
logAge=$(date -v-1d "+%s000")
72
76
73
77
# Collect some information about the Lambda function and associated log groups
74
-
# Change the timeframe to be dynamically set with a default of 24h. Currently collects the last 24 hours of Lambda logs
75
78
lambdaFunction=$(aws cloudformation describe-stack-resources --stack-name "$stackName" --logical-resource-id Autoscaling --query "StackResources[*].PhysicalResourceId" --output text | sed -nr 's/.*stack\/(.*)\/.*/\1/p')
0 commit comments