「Fall back to current time: {‘timestamp’: xxxxxxxxxxxxx, ‘start_position’: xxxxxxxxxxx, ‘end_position’: xxxxxxxxxxx}, reason: timestamp could not be parsed from message.」を回避するには

2023.08.15

困っていること

CloudWatch Logs エージェント (awslogs) を利用して CloudWatch Logs にログデータ送信ができません。 以下のエラーが出力されています。対処法を教えてください。

cwlogs.push.reader - WARNING - 12734 - Thread-26 - Fall back to current time: {'timestamp': xxxxxxxxxxxxx, 'start_position': xxxxxxxxxxx, 'end_position': xxxxxxxxxxx}, reason: timestamp could not be parsed from message.

どう対応すればいいの?

/etc/awslogs/awslogs.conf で指定された "datetime_format" がログイベントのタイムスタンプ形式と一致するかどうかを確認します。
タイムスタンプ形式と一致するように "datetime_format" を変更してください。

Timestamp errors include:

Fall back to previous event time: {'timestamp': 1492395793000, 'start_position': 17280L, 'end_position': 17389L}, previousEventTime: 1492395793000, reason: timestamp could not be parsed from message. – Confirm that the log events begin with a timestamp. Check if the datetime_format specified in /etc/awslogs/awslogs.conf matches the timestamp format of the log events. Change the datetime_format to match the timestamp format as needed.
No file is found with given path ' ' – Update the log file path in the agent configuration file to the correct path.

※ datetime_format の記載例を参考にご対応してください。

補足

AWS では CloudWatch Logs エージェントではなく、CloudWatch エージェントを使用することを推奨しています。 そのため、CloudWatch エージェントに変更することもご検討ください。

参考資料