I'm set include_headers flag to value true, yet even though headers gets included into output on first run, at later time on re-run schedule of very same pipeline, the headers are no longer included into output...
per the above mention documentation, may be it has something to do with this?
When encoding in an output plugin, include headers in the encoded CSV once per codec lifecyle (not for every event)
How do I enforce include_headers at ALL time (not the just first run)?
The codec only outputs headers once in its lifecycle. With scheduling the pipeline does not restart, it just sleeps until the next scheduled time, so it is not going to output headers again.
Not within logstash itself. It could probably be done externally. For example, if you have --config.reload.automatic enabled and path.config pointed to a directory and you want to schedule execution every 10 minutes, then you could create a file with a single blank line in the directory at 10, 30, and 50 past the hour, and remove that file at 00, 20, and 40 past the hour. That would trigger a reload of the pipeline which would cause the headers to be written again. You would then remove the scheduling from the input.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.