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

     1  ## `generate_input` operator
     2  
     3  The `generate_input` operator generates log entries with a static record. This is useful for testing pipelines, especially when
     4  coupled with the [`rate_limit`](/docs/operators/rate_limit.md) operator.
     5  
     6  ### Configuration Fields
     7  
     8  | Field             | Default          | Description                                                                                      |
     9  | ---               | ---              | ---                                                                                              |
    10  | `id`              | `generate_input` | A unique identifier for the operator                                                             |
    11  | `output`          | Next in pipeline | The connected operator(s) that will receive all outbound entries                                 |
    12  | `write_to`        | $                | A [field](/docs/types/field.md) that will be set to the path of the file the entry was read from |
    13  | `entry`           |                  | A [entry](/docs/types/entry.md) log entry to repeatedly generate                                 |
    14  | `count`           | 0                | The number of entries to generate before stopping. A value of 0 indicates unlimited              |
    15  | `static`          | `false`          | If true, the timestamp of the entry will remain static after each invocation                     |
    16  
    17  ### Example Configurations
    18  
    19  #### Mock a file input
    20  
    21  Configuration:
    22  ```yaml
    23  - type: generate_input
    24    record:
    25      message1: log1
    26      message2: log2
    27  ```
    28  
    29  Output records:
    30  ```json
    31  {
    32    "message1": "log1",
    33    "message2": "log2"
    34  },
    35  {
    36    "message1": "log1",
    37    "message2": "log2"
    38  },
    39  ...
    40  ```