Output file adding static opening/closing line

Hi all,

probably a pretty newbie question, but I would like to add to output files automatically a static opening and closing line.

I.e., I would like to split on a daily basis an output file [1] where I have individual json objects per line

L1 {...}
L2 {...}
L3 {...}
...

where the closed file is obviously no proper JSON itself, so I would like to add an opener/header (and list commas)

L0 [
L1 {...} ,
L2 {...} ,
L3 {...} ,
...
LE ]

but how should a filter(?) look like to add such an opening/closing line per daily rotated file?

Cheers and thanks for ideas,
Thomas

[1]

output {
file {
...
path => "/my.out/path/name-%{+YYYYMMDD}.txt"
}
}

I cannot think of a way of doing that. (And I know that doesn't help, but at least you know you are not being completely ignored.)

1 Like

OK - thanks for the feedback
it helps - at least I know not to spend much more time on it and feel not too stupid :sweat_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.