OpenSearch sink

Overview

Sink for an OpenSearch cluster.

OptionRequiredTypeDescription
hostsYesListList of OpenSearch hosts to write to (e.g. [“https://localhost:9200“, “https://remote-cluster:9200“]).
certNoStringPath to the security certificate (e.g. “config/root-ca.pem”) if the cluster uses the OpenSearch security plugin.
usernameNoStringUsername for HTTP basic authentication.
passwordNoStringPassword for HTTP basic authentication.
aws_sigv4NoBooleandefault false. Whether to use IAM signing to connect to an Amazon OpenSearch Service domain. For your access key, secret key, and optional session token, Data Prepper uses the default credential chain (environment variables, Java system properties, ~/.aws/credential, etc.).
aws_regionNoStringAWS region (e.g. “us-east-1”) for the domain if you are connecting to Amazon OpenSearch Service.
aws_sts_role_arnNoStringIAM role which the sink plugin assumes to sign request to Amazon OpenSearch Service. If not provided, the plugin uses the default credentials.
socket_timeoutNoIntegerthe timeout in milliseconds for waiting for data (or, put differently, a maximum period inactivity between two consecutive data packets). A timeout value of zero is interpreted as an infinite timeout. If this timeout value is negative or not set, the underlying Apache HttpClient would rely on operating system settings for managing socket timeouts.
connect_timeoutNoIntegerThe timeout in milliseconds used when requesting a connection from the connection manager. A timeout value of zero is interpreted as an infinite timeout. If this timeout value is negative or not set, the underlying Apache HttpClient would rely on operating system settings for managing connection timeouts.
insecureNoBooleanWhether to verify SSL certificates. If set to true, CA certificate verification is disabled and insecure HTTP requests are sent instead. Default is false.
proxyNoStringThe address of a forward HTTP proxy server. The format is “<host name or IP>:<port>”. Examples: “example.com:8100”, “http://example.com:8100”, “112.112.112.112:8100”. Port number cannot be omitted.
indexConditionallyStringName of the export index. Applicable and required only when the index_type is custom.
index_typeNoStringThis index type tells the Sink plugin what type of data it is handling. Valid values: custom, trace-analytics-raw, trace-analytics-service-map, management-disabled. Default is custom.
template_fileNoStringPath to a JSON index template file (e.g. /your/local/template-file.json) if index_type is custom. See otel-v1-apm-span-index-template.json for an example.
document_id_fieldNoStringThe field from the source data to use for the OpenSearch document ID (e.g. “my-field”) if index_type is custom.
dlq_fileNoStringThe path to your preferred dead letter queue file (e.g. /your/local/dlq-file). Data Prepper writes to this file when it fails to index a document on the OpenSearch cluster.
bulk_sizeNoInteger (long)The maximum size (in MiB) of bulk requests to the OpenSearch cluster. Values below 0 indicate an unlimited size. If a single document exceeds the maximum bulk request size, Data Prepper sends it individually. Default is 5.
ism_policy_fileNoStringThe absolute file path for an ISM (Index State Management) policy JSON file. This policy file is effective only when there is no built-in policy file for the index type. For example, custom index type is currently the only one without a built-in policy file, thus it would use the policy file here if it’s provided through this parameter. For more information, see ISM policies.
number_of_shardsNoIntegerThe number of primary shards that an index should have on the destination OpenSearch server. This parameter is effective only when template_file is either explicitly provided in Sink configuration or built-in. If this parameter is set, it would override the value in index template file. For more information, see Create index.
number_of_replicasNoIntegerThe number of replica shards each primary shard should have on the destination OpenSearch server. For example, if you have 4 primary shards and set number_of_replicas to 3, the index has 12 replica shards. This parameter is effective only when template_file is either explicitly provided in Sink configuration or built-in. If this parameter is set, it would override the value in index template file. For more information, see Create index.