logstash/docs/reference/plugins-outputs-java_stdout.md
Colleen McGinnis 3115c78bf8
[docs] Migrate docs from AsciiDoc to Markdown (#17159)
* delete asciidoc files
* add migrated files
2025-02-26 14:19:48 -05:00

3.4 KiB

navigation_title mapped_pages
java_stdout
https://www.elastic.co/guide/en/logstash/current/plugins-outputs-java_stdout.html

Java_stdout output plugin [plugins-outputs-java_stdout]

{{ls}} Core Plugin. The java_stdout output plugin cannot be installed or uninstalled independently of {{ls}}.

Getting help [_getting_help_88]

For questions about the plugin, open a topic in the Discuss forums. For bugs or feature requests, open an issue in Github.

Description [_description_88]

Prints events to the STDOUT of the shell running Logstash. This output is convenient for debugging plugin configurations by providing instant access to event data after it has passed through the inputs and filters.

For example, the following output configuration in conjunction with the Logstash -e command-line flag, will allow you to see the results of your event pipeline for quick iteration.

    output {
      java_stdout {}
    }

Useful codecs include:

java_line: outputs event data in JSON format followed by an end-of-line character. This is the default codec for java_stdout.

    output {
      stdout { }
    }

Java_stdout Output Configuration Options [plugins-outputs-java_stdout-options]

There are no special configuration options for this plugin, but it does support the Common options.

Common options [plugins-outputs-java_stdout-common-options]

These configuration options are supported by all output plugins:

Setting Input type Required
codec codec No
enable_metric boolean No
id string No

codec [plugins-outputs-java_stdout-codec]

  • Value type is codec
  • Default value is "java_line"

The codec used for output data. Output codecs are a convenient method for encoding your data before it leaves the output without needing a separate filter in your Logstash pipeline.

enable_metric [plugins-outputs-java_stdout-enable_metric]

  • Value type is boolean
  • Default value is true

Disable or enable metric logging for this specific plugin instance. By default we record all the metrics we can, but you can disable metrics collection for a specific plugin.

id [plugins-outputs-java_stdout-id]

  • Value type is string
  • There is no default value for this setting.

Add a unique ID to the plugin configuration. If no ID is specified, Logstash will generate one. It is strongly recommended to set this ID in your configuration. This is particularly useful when you have two or more plugins of the same type. For example, if you have 2 java_stdout outputs. Adding a named ID in this case will help in monitoring Logstash when using the monitoring APIs.

output {
  java_stdout {
    id => "my_plugin_id"
  }
}

::::{note} Variable substitution in the id field only supports environment variables and does not support the use of values from the secret store. ::::