Commit 695ff9a
authored
[Develop][Bug] Fix incorrect timestamp parsing for chef-client.log in CloudWatch Agent (#3068)
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' format1 parent 0854f39 commit 695ff9a
File tree
2 files changed
+3
-1
lines changed- cookbooks/aws-parallelcluster-environment/files/cloudwatch
2 files changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | | - | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
0 commit comments