App Search output plugin

App Search output plugin

  • Plugin version: v1.1.1
  • Released on: 2020-09-16
  • Changelog

For other versions, see the Versioned plugin docs.

Getting Help

For questions about the plugin, open a topic in the Discuss forums. For bugs or feature requests, open an issue in Github. For the list of Elastic supported plugins, please consult the Elastic Support Matrix.

Description

This output lets you send events to the Elastic App Search solution, both the self-managed or the managed service. On receiving a batch of events from the Logstash pipeline, the plugin converts the events into documents and uses the App Search bulk API to index multiple events in one request.

App Search doesn’t allow fields to begin with @timestamp. By default the @timestamp and @version fields will be removed from each event before the event is sent to App Search. If you want to keep the @timestamp field, you can use the timestamp_destination option to store the timestamp in a different field.

This gem does not support codec customization.

AppSearch Output Configuration Options

This plugin supports the following configuration options plus the Common Options described later.

Also see Common Options for a list of options supported by all output plugins.

 

api_key

  • Value type is password
  • There is no default value

The private API Key with write permissions. Visit the Credentials in the App Search dashboard to find the key associated with your account.

document_id

  • Value type is string
  • There is no default value

The id for app search documents. This can be an interpolated value like myapp-%{sequence_id}. Reusing ids will cause documents to be rewritten.

engine

  • Value type is string
  • There is no default value

The Engine name. Engine is your search engine created in App Search, an information repository that includes the indexed document records.

host

  • Value type is string
  • There is no default value

The hostname of the App Search API that is associated with your App Search account. Set this when using the Elastic App Search managed service.

path

  • Value type is string
  • Default value is /api/as/v1/

The path that is appended to the url parameter when connecting to a self-managed Elastic App Search.

timestamp_destination

  • Value type is string
  • There is no default value

Where to move the value from the @timestamp field.

All Logstash events contain a @timestamp field. App Search doesn’t support fields starting with @timestamp, and by default, the @timestamp field will be deleted.

To keep the timestamp field, set this value to the name of the field where you want @timestamp copied.

url

  • Value type is string
  • There is no default value

The value of the API endpoint in the form of a URL. Note: The value of the of the path setting will be will be appended to this URL. Set this when using the self-managed Elastic App Search.

Common Options

The following configuration options are supported by all output plugins:

Setting Input type Required

enable_metric

boolean

No

id

string

No

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

  • 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 elastic_app_search outputs. Adding a named ID in this case will help in monitoring Logstash when using the monitoring APIs.

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

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