Skip to content

Listens for incoming Unix domain socket connections and receives events.

accept_unix_socket path:string, [max_connections=int] {}

Listens on the specified filesystem-backed Unix stream socket path. For each accepted connection, the operator spawns the nested pipeline and feeds it the bytes received from that connection.

Before listening, the operator removes a stale socket file at path. If another server is actively listening at path, or if another file type already exists there, the operator emits an error. When the operator shuts down, it removes the socket path that it created.

The Unix domain socket path to listen on. The path may start with ~, which expands to the current user’s home directory. Relative paths are resolved relative to the process working directory.

The operator supports filesystem-backed Unix domain sockets only. It doesn’t support Linux abstract namespace sockets.

The maximum number of simultaneous incoming connections to accept. Additional connections beyond this limit are rejected.

Defaults to 128.

The pipeline to run for each individual Unix domain socket connection. Unless you are sure that there is at most one active connection at a time, specify a pipeline that parses the individual connection streams into events, for instance { read_json }. Otherwise, the output can be interleaved.

Accept incoming JSON over a Unix domain socket

Section titled “Accept incoming JSON over a Unix domain socket”
accept_unix_socket "/run/collector.sock" {
read_json
}

Last updated: