mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
parent
6669e2bd19
commit
241d8b68b1
1 changed files with 120 additions and 0 deletions
120
docs/static/core-plugins/inputs/java-generator.asciidoc
vendored
Normal file
120
docs/static/core-plugins/inputs/java-generator.asciidoc
vendored
Normal file
|
@ -0,0 +1,120 @@
|
|||
:plugin: java_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}"]
|
||||
|
||||
=== Java generator input plugin
|
||||
|
||||
include::{include_path}/plugin_header.asciidoc[]
|
||||
|
||||
==== Description
|
||||
|
||||
Generate synthethic log events.
|
||||
|
||||
This plugin generates a stream of synthetic events that can be used to test the correctness or performance of a
|
||||
Logstash pipeline.
|
||||
|
||||
|
||||
[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}-eps>> |<<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.
|
||||
|
||||
|
||||
|
||||
[id="plugins-{type}s-{plugin}-count"]
|
||||
===== `count`
|
||||
|
||||
* Value type is <<number,number>>
|
||||
* Default value is `0`
|
||||
|
||||
Sets the number of events that should be generated.
|
||||
|
||||
The default, `0`, means generate an unlimited number of events.
|
||||
|
||||
[id="plugins-{type}s-{plugin}-eps"]
|
||||
===== `eps`
|
||||
|
||||
* Value type is <<number,number>>
|
||||
* Default value is `0`
|
||||
|
||||
Sets the rate at which events should be generated. Fractional values may be specified. For
|
||||
example, a rate of `0.25` means that one event will be generated every four seconds.
|
||||
|
||||
The default, `0`, means generate events as fast as possible.
|
||||
|
||||
[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 overrides the 'message' setting if it has also been specified.
|
||||
|
||||
Example:
|
||||
[source,ruby]
|
||||
input {
|
||||
java_generator {
|
||||
lines => [
|
||||
"line 1",
|
||||
"line 2",
|
||||
"line 3"
|
||||
]
|
||||
# Emit all lines 2 times.
|
||||
count => 2
|
||||
}
|
||||
}
|
||||
|
||||
The above will emit a series of three events `line 1` then `line 2` then `line 3` two times for a total of 6 events.
|
||||
|
||||
[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.
|
||||
|
||||
[id="plugins-{type}s-{plugin}-threads"]
|
||||
===== `threads`
|
||||
|
||||
* Value type is <<number,number>>
|
||||
* Default value is `1`
|
||||
|
||||
Increasing the number of generator threads up to about the number of CPU cores generally increases overall event
|
||||
throughput. The `count`, `eps`, and `lines` settings all apply on a per-thread basis. In other words, each thread
|
||||
will emit the number of events specified in the `count` setting for a total of `threads * count` events. Each thread
|
||||
will emit events at the `eps` rate for a total rate of `threads * eps`, and each thread will emit each line specified
|
||||
in the `lines` option.
|
||||
|
||||
|
||||
|
||||
[id="plugins-{type}s-{plugin}-common-options"]
|
||||
include::{include_path}/{type}.asciidoc[]
|
||||
|
||||
:default_codec!:
|
Loading…
Add table
Add a link
Reference in a new issue