agent = require("agent")
collector = agent.collector.script(
command = command("journalctl -f -o json -u some.unit --output-fields MESSAGE"),
schedule = "", # optional
directory = "./", # optional
env = { "VAR": "VALUE" }, # optional
bufferSize = 32 * 1024, # optional
format = "line-json", # optional
# each line is a whole JSON message
# "line-log"
)
Function command() returns a command object. It defines a shell script and its environment. All commands created during configuration phase may be examined before execution of a given agent configuration for security audit.