:plugin: generator
:type: input
:default_codec: plain

///////////////////////////////////////////
START - GENERATED VARIABLES, DO NOT EDIT!
///////////////////////////////////////////
:version: %VERSION%
:release_date: %RELEASE_DATE%
:changelog_url: %CHANGELOG_URL%
:include_path: ../../../../logstash/docs/include
///////////////////////////////////////////
END - GENERATED VARIABLES, DO NOT EDIT!
///////////////////////////////////////////

[id="plugins-{type}s-{plugin}"]

=== Generator input plugin

include::{include_path}/plugin_header.asciidoc[]

==== Description

Generate random log events.

The general intention of this is to test performance of plugins.

An event is generated first

[id="plugins-{type}s-{plugin}-options"]
==== Generator Input Configuration Options

This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.

[cols="<,<,<",options="header",]
|=======================================================================
|Setting |Input type|Required
| <<plugins-{type}s-{plugin}-count>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-lines>> |<<array,array>>|No
| <<plugins-{type}s-{plugin}-message>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-threads>> |<<number,number>>|No
|=======================================================================

Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
input plugins.

&nbsp;

[id="plugins-{type}s-{plugin}-count"]
===== `count` 

  * Value type is <<number,number>>
  * Default value is `0`

Set how many messages should be generated.

The default, `0`, means generate an unlimited number of events.

[id="plugins-{type}s-{plugin}-lines"]
===== `lines` 

  * Value type is <<array,array>>
  * There is no default value for this setting.

The lines to emit, in order. This option cannot be used with the 'message'
setting.

Example:
[source,ruby]
    input {
      generator {
        lines => [
          "line 1",
          "line 2",
          "line 3"
        ]
        # Emit all lines 3 times.
        count => 3
      }
    }

The above will emit `line 1` then `line 2` then `line`, then `line 1`, etc...

[id="plugins-{type}s-{plugin}-message"]
===== `message` 

  * Value type is <<string,string>>
  * Default value is `"Hello world!"`

The message string to use in the event.

If you set this to `stdin` then this plugin will read a single line from
stdin and use that as the message string for every event.

Otherwise, this value will be used verbatim as the event message.

[id="plugins-{type}s-{plugin}-threads"]
===== `threads` 

  * Value type is <<number,number>>
  * Default value is `1`





[id="plugins-{type}s-{plugin}-common-options"]
include::{include_path}/{type}.asciidoc[]

:default_codec!: