Class GrokProcessor.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • field

      public final GrokProcessor.Builder field(String value)
      Required - The field to use for grok expression parsing.

      API name: field

    • ignoreMissing

      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

      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 entries of map to patternDefinitions.

    • patternDefinitions

      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

      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

      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

      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

    • self

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

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