Class GrokProcessor.Builder

All Implemented Interfaces:
CopyableBuilder<GrokProcessor.Builder,GrokProcessor>, MutableBuilder<GrokProcessor.Builder,GrokProcessor>, ObjectBuilder<GrokProcessor>
Enclosing class:
GrokProcessor

public static class GrokProcessor.Builder extends ProcessorBase.AbstractBuilder<GrokProcessor.Builder> implements CopyableBuilder<GrokProcessor.Builder,GrokProcessor>
Builder for GrokProcessor.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • copy

      @Nonnull public GrokProcessor.Builder copy()
      Description copied from interface: CopyableBuilder
      Create a new builder CopyableBuilder that is a copy of this one.
      Specified by:
      copy in interface CopyableBuilder<GrokProcessor.Builder,GrokProcessor>
      Returns:
      a new builder instance.
    • self

      @Nonnull protected GrokProcessor.Builder self()
      Specified by:
      self in class ProcessorBase.AbstractBuilder<GrokProcessor.Builder>
    • field

      @Nonnull public final GrokProcessor.Builder field(String value)
      Required - API name: field
    • ignoreMissing

      @Nonnull public final GrokProcessor.Builder ignoreMissing(@Nullable Boolean value)
      If true and field does not exist or is null, the processor quietly exits without modifying the document.

      API name: ignore_missing

    • patternDefinitions

      @Nonnull public final GrokProcessor.Builder patternDefinitions(Map<String,String> map)
      A map of pattern-name and pattern tuples defining custom patterns to be used by the current processor. Patterns matching existing names will override the pre-existing definition.

      API name: pattern_definitions

      Adds all elements of map to patternDefinitions.

    • patternDefinitions

      @Nonnull public final GrokProcessor.Builder patternDefinitions(String key, String value)
      A map of pattern-name and pattern tuples defining custom patterns to be used by the current processor. Patterns matching existing names will override the pre-existing definition.

      API name: pattern_definitions

      Adds an entry to patternDefinitions.

    • patterns

      @Nonnull public final GrokProcessor.Builder patterns(List<String> list)
      Required - An ordered list of grok expression to match and extract named captures with. Returns on the first expression in the list that matches.

      API name: patterns

      Adds all elements of list to patterns.

    • patterns

      @Nonnull public final GrokProcessor.Builder patterns(String value, String... values)
      Required - An ordered list of grok expression to match and extract named captures with. Returns on the first expression in the list that matches.

      API name: patterns

      Adds one or more values to patterns.

    • traceMatch

      @Nonnull public final GrokProcessor.Builder traceMatch(@Nullable Boolean value)
      When true, _ingest._grok_match_index will be inserted into your matched document's metadata with the index into the pattern found in patterns that matched.

      API name: trace_match

    • build

      @Nonnull public GrokProcessor build()
      Builds a GrokProcessor.
      Specified by:
      build in interface ObjectBuilder<GrokProcessor>
      Throws:
      NullPointerException - if some of the required fields are null.