github.com/observiq/carbon@v0.9.11-0.20200820160507-1b872e368a5e/docs/operators/tcp_input.md (about)

     1  ## `tcp_input` operator
     2  
     3  The `tcp_input` operator listens for logs on one or more TCP connections. The operator assumes that logs are newline separated.
     4  
     5  ### Configuration Fields
     6  
     7  | Field             | Default          | Description                                                                       |
     8  | ---               | ---              | ---                                                                               |
     9  | `id`              | `tcp_input`      | A unique identifier for the operator                                              |
    10  | `output`          | Next in pipeline | The connected operator(s) that will receive all outbound entries                  |
    11  | `listen_address`  | required         | A listen address of the form `<ip>:<port>`                                        |
    12  | `write_to`        | $                | The record [field](/docs/types/field.md) written to when creating a new log entry |
    13  | `labels`          | {}               | A map of `key: value` labels to add to the entry's labels                         |
    14  | `resource`        | {}               | A map of `key: value` labels to add to the entry's resource                       |
    15  
    16  ### Example Configurations
    17  
    18  #### Simple
    19  
    20  Configuration:
    21  ```yaml
    22  - type: tcp_input
    23    listen_adress: "0.0.0.0:54525"
    24  ```
    25  
    26  Send a log:
    27  ```bash
    28  $ nc localhost 54525 <<EOF
    29  heredoc> message1
    30  heredoc> message2
    31  heredoc> EOF
    32  ```
    33  
    34  Generated entries:
    35  ```json
    36  {
    37    "timestamp": "2020-04-30T12:10:17.656726-04:00",
    38    "record": "message1"
    39  },
    40  {
    41    "timestamp": "2020-04-30T12:10:17.657143-04:00",
    42    "record": "message2"
    43  }
    44  ```