out_execTimeSliced Output plugin passes events to an external program. The program receives the path to a file containing the incoming events as its last argument. The file format is tab-separated values (TSV) by default.
ARGV[-1]). The following script
fizzbuzz.pyruns FizzBuzz against the new-line delimited sequence of natural numbers (1, 2, 3...) and writes the output to
out_exec(as well as
in_exec), the program can be written in any language, not just Ruby.
<format>tells Fluentd to extract the
fizzbuzzfield and output it as TSV. This simple example has a single key, but you can of course extract multiple fields and use
format jsonto output newline-delimited JSON.
/path/to/buffer_path, and the command
python /path/to/fizzbuzz.py /path/to/buffer_pathis run. This is why in
fizzbuzz.py, it is reading the file at
execplugin passes the path of flushed buffer chunk as the last argument.
commandparameter like this:
cmddoes not exist in PATH, you need to specify the absolute path, e.g.