Resolving "data could not be added to batch" error #218
-
Hello @brexhq/substation! We are running into the following error when parsing a cloudtrail log source. ContextInput Log FormatCloudtrail log format: {"Records": [... list of JSON logs]} Transformation
helpers.libsonnet
Error String
I am trying to understand where this error might be coming from. I have an identical configuration for other cloudtrail log sources which seem to not have issues. I investigated where the "stdout" part of the error comes from, since send_stdout is not a part of the transform. It seems like the aggregate_to_array transform prints this error, but only the aggregate_from_array transform is used in helpers. Are there any ideas on how to resolve this? Thanks so much! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
@nishaprabhakar Some additional questions that might help us debug:
I checked the main branch and don't see the string |
Beta Was this translation helpful? Give feedback.
@nishaprabhakar I think I see the problem, but you may want to delete that comment (in case you're concerned about the AWS resource listed).
The format to JSONL pattern has the default batch settings coded into it (seen here). That's limiting the total size of the batch to 1 MB, and since you increased the size on the S3 send to 20 MB, you probably have events larger than that; the S3 settings is accepting data larger than 1 MB, but the JSONL conversion isn't.
In this case the best thing to do is rewrite that pattern into your helpers function with a much larger
size
value (same as thesend_s3
config). Alternatively, you could overwrite the default value in your localsubstation.libsonnet
…