:plugin: java_uuid
:type: filter

///////////////////////////////////////////
REPLACES GENERATED VARIABLES
///////////////////////////////////////////
:include_path: ../../../../../logstash/docs/include
///////////////////////////////////////////
END - REPLACES GENERATED VARIABLES
///////////////////////////////////////////


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

=== Java_uuid filter plugin

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

==== Description

The uuid filter allows you to generate a
https://en.wikipedia.org/wiki/Universally_unique_identifier[UUID]
and add it as a field to each processed event.

This is useful if you need to generate a string that's unique for every
event even if the same input is processed multiple times. If you want
to generate strings that are identical each time an event with the same
content is processed (i.e., a hash), you should use the
{logstash-ref}/plugins-filters-fingerprint.html[fingerprint filter] instead.

The generated UUIDs follow the version 4 definition in
https://tools.ietf.org/html/rfc4122[RFC 4122] and will be
represented in standard hexadecimal string format, e.g.
"e08806fe-02af-406c-bbde-8a5ae4475e57".

[id="plugins-{type}s-{plugin}-options"]
==== Java_uuid Filter 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}-overwrite>> |<<boolean,boolean>>|No
| <<plugins-{type}s-{plugin}-target>> |<<string,string>>|Yes
|=======================================================================

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

&nbsp;

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

  * Value type is <<boolean,boolean>>
  * Default value is `false`

Determines if an existing value in the field specified by the `target` option should
be overwritten by the filter.

Example:
[source,ruby]
   filter {
      java_uuid {
        target    => "uuid"
        overwrite => true
      }
   }

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

  * This is a required setting.
  * Value type is <<string,string>>
  * There is no default value for this setting.

Specifies the name of the field in which the generated UUID should be stored.

Example:
[source,ruby]
    filter {
      java_uuid {
        target => "uuid"
      }
    }



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