Skip to main content

subprocess

BETA

This component is mostly stable but breaking changes could still be made outside of major version releases if a fundamental problem with the component is found.

Executes a command, runs it as a subprocess, and writes messages to it over stdin.

# Config fields, showing default values
output:
label: ""
subprocess:
name: "" # No default (required)
args: []
codec: lines

Messages are written according to a specified codec. The process is expected to terminate gracefully when stdin is closed.

If the subprocess exits unexpectedly then Bento will log anything printed to stderr and will log the exit code, and will attempt to execute the command again until success.

The execution environment of the subprocess is the same as the Bento instance, including environment variables and the current working directory.

Fields

name

The command to execute as a subprocess.

Type: string

args

A list of arguments to provide the command.

Type: array
Default: []

codec

The way in which messages should be written to the subprocess.

Type: string
Default: "lines"
Options: lines.