From 241d8b68b1fdd51aaa9b431f0df1a380e83dbf20 Mon Sep 17 00:00:00 2001 From: Dan Hermann Date: Wed, 12 Jun 2019 17:57:02 -0500 Subject: [PATCH] docs for java_generator input Fixes #10857 --- .../inputs/java-generator.asciidoc | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 docs/static/core-plugins/inputs/java-generator.asciidoc diff --git a/docs/static/core-plugins/inputs/java-generator.asciidoc b/docs/static/core-plugins/inputs/java-generator.asciidoc new file mode 100644 index 000000000..d3b9b422e --- /dev/null +++ b/docs/static/core-plugins/inputs/java-generator.asciidoc @@ -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 <> described later. + +[cols="<,<,<",options="header",] +|======================================================================= +|Setting |Input type|Required +| <> |<>|No +| <> |<>|No +| <> |<>|No +| <> |<>|No +| <> |<>|No +|======================================================================= + +Also see <> for a list of options supported by all +input plugins. + +  + +[id="plugins-{type}s-{plugin}-count"] +===== `count` + + * Value type is <> + * 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 <> + * 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 <> + * 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 <> + * Default value is `"Hello world!"` + +The message string to use in the event. + +[id="plugins-{type}s-{plugin}-threads"] +===== `threads` + + * Value type is <> + * 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!: \ No newline at end of file