Class IpLocationProcessor.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • databaseFile

      public final IpLocationProcessor.Builder databaseFile(@Nullable String value)
      The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory.

      API name: database_file

    • field

      public final IpLocationProcessor.Builder field(String value)
      Required - The field to get the ip address from for the geographical lookup.

      API name: field

    • firstOnly

      public final IpLocationProcessor.Builder firstOnly(@Nullable Boolean value)
      If true, only the first found IP location data will be returned, even if the field contains an array.

      API name: first_only

    • ignoreMissing

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

      API name: ignore_missing

    • properties

      public final IpLocationProcessor.Builder properties(List<String> list)
      Controls what properties are added to the target_field based on the IP location lookup.

      API name: properties

      Adds all elements of list to properties.

    • properties

      public final IpLocationProcessor.Builder properties(String value, String... values)
      Controls what properties are added to the target_field based on the IP location lookup.

      API name: properties

      Adds one or more values to properties.

    • targetField

      public final IpLocationProcessor.Builder targetField(@Nullable String value)
      The field that will hold the geographical information looked up from the MaxMind database.

      API name: target_field

    • downloadDatabaseOnPipelineCreation

      public final IpLocationProcessor.Builder downloadDatabaseOnPipelineCreation(@Nullable Boolean value)
      If true (and if ingest.geoip.downloader.eager.download is false), the missing database is downloaded when the pipeline is created. Else, the download is triggered by when the pipeline is used as the default_pipeline or final_pipeline in an index.

      API name: download_database_on_pipeline_creation

    • self

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

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