Skip to content

Commit 4aa21a5

Browse files
authored
[Release-3.14.1][Bug] Fix incorrect timestamp parsing for chef-client.log in CloudWatch Agent (#3061)
The CloudWatch Agent configuration was using the `default` timestamp format (%Y-%m-%d %H:%M:%S,%f) for chef-client.log, but Chef/Cinc outputs ISO 8601 timestamps in format: `[YYYY-MM-DDTHH:MM:SS+TZ]`. This mismatch caused CloudWatch to fail parsing timestamps, resulting in log lines being associated with incorrect timestamps. - Add new 'chef' timestamp format: `[%Y-%m-%dT%H:%M:%S` (Note: CloudWatch Agent's %z only supports timezone without colon like -0700, but Chef outputs +02:00 format. We only match up to seconds and let CloudWatch handle the rest.) - Update chef-client.log configuration to use the new 'chef' format
1 parent da4e9d1 commit 4aa21a5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ This file is used to list changes made in each version of the AWS ParallelCluste
2929
- Open MPI: openmpi40-aws-4.1.7-2 and openmpi50-aws-5.0.8-11
3030

3131
**BUG FIXES**
32+
- Fix incorrect timestamp parsing for chef-client.log in CloudWatch Agent configuration.
3233
- Prevent cluster readiness check failures due to instances launched while the check is in progress.
3334
- Fix race condition where compute nodes could deploy the wrong cluster config version after an update failure.
3435

cookbooks/aws-parallelcluster-environment/files/cloudwatch/cloudwatch_agent_config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"default": "%Y-%m-%d %H:%M:%S,%f",
55
"bracket_default": "[%Y-%m-%d %H:%M:%S]",
66
"slurm": "%Y-%m-%dT%H:%M:%S.%f",
7+
"chef": "[%Y-%m-%dT%H:%M:%S",
78
"json": ""
89
},
910
"log_configs": [
@@ -82,7 +83,7 @@
8283
"feature_conditions": []
8384
},
8485
{
85-
"timestamp_format_key": "default",
86+
"timestamp_format_key": "chef",
8687
"file_path": "/var/log/chef-client.log",
8788
"log_stream_name": "chef-client",
8889
"schedulers": [

0 commit comments

Comments
 (0)