Configuring Data Prepper

You can customize your Data Prepper configuration by editing the data-prepper-config.yaml file in your Data Prepper installation. The following configuration options are independent from pipeline configuration options.

Data Prepper configuration

Use the following options to customize your Data Prepper configuration.

OptionRequiredTypeDescription
sslNoBooleanIndicates whether TLS should be used for server APIs. Defaults to true.
keyStoreFilePathNoStringThe path to a .jks or .p12 keystore file. Required if ssl is true.
keyStorePasswordNoStringThe password for keystore. Optional, defaults to empty string.
privateKeyPasswordNoStringThe password for a private key within keystore. Optional, defaults to empty string.
serverPortNoIntegerThe port number to use for server APIs. Defaults to 4900.
metricRegistriesNoListThe metrics registries for publishing the generated metrics. Currently supports Prometheus and Amazon CloudWatch. Defaults to Prometheus.
metricTagsNoMapA map of key-value pairs as common metric tags to metric registries. The maximum number of pairs is three. Note that serviceName is a reserved tag key with DataPrepper as the default tag value. Alternatively, administrators can set this value through the environment variable DATAPREPPER_SERVICE_NAME. If serviceName is defined in metricTags, that value overwrites those set through the above methods.
authenticationNoObjectThe authentication configuration. Valid option is http_basic with username and password properties. If not defined, the server does not perform authentication.
processorShutdownTimeoutNoDurationThe time given to processors to clear any in-flight data and gracefully shut down. Default is 30s.
sinkShutdownTimeoutNoDurationThe time given to sinks to clear any in-flight data and gracefully shut down. Default is 30s.
peer_forwarderNoObjectPeer forwarder configurations. See Peer forwarder options for more details.
circuit_breakersNocircuit_breakersConfigures a circuit breaker on incoming data.

Peer forwarder options

The following section details various configuration options for peer forwarder.

General options for peer forwarding

OptionRequiredTypeDescription
portNoIntegerThe peer forwarding server port. Valid options are between 0 and 65535. Defaults is 4994.
request_timeoutNoIntegerThe request timeout for the peer forwarder HTTP server in milliseconds. Default is 10000.
server_thread_countNoIntegerThe number of threads used by the peer forwarder server. Default is 200.
client_thread_countNoIntegerThe number of threads used by the peer forwarder client. Default is 200.
max_connection_countNoIntegerThe maximum number of open connections for the peer forwarder server. Default is 500.
max_pending_requestsNoIntegerThe maximum number of allowed tasks in ScheduledThreadPool work queue. Default is 1024.
discovery_modeNoStringThe peer discovery mode to use. Valid options are local_node, static, dns, or aws_cloud_map. Defaults to local_node, which processes events locally.
static_endpointsConditionallyListA list containing endpoints of all Data Prepper instances. Required if discovery_mode is set to static.
domain_nameConditionallyStringA single domain name to query DNS against. Typically, used by creating multiple DNS A Records for the same domain. Required if discovery_mode is set to dns.
aws_cloud_map_namespace_nameConditionallyStringCloud Map namespace when using AWS Cloud Map service discovery. Required if discovery_mode is set to aws_cloud_map.
aws_cloud_map_service_nameConditionallyStringThe Cloud Map service name when using AWS Cloud Map service discovery. Required if discovery_mode is set to aws_cloud_map.
aws_cloud_map_query_parametersNoMapA map of key-value pairs to filter the results based on the custom attributes attached to an instance. Only instances that match all the specified key-value pairs are returned.
buffer_sizeNoIntegerThe maximum number of unchecked records the buffer accepts. Number of unchecked records is the sum of the number of records written into the buffer and the num of in-flight records not yet checked by the Checkpointing API. Default is 512.
batch_sizeNoIntegerThe maximum number of records the buffer returns on read. Default is 48.
aws_regionConditionallyStringThe AWS region to use with ACM, S3 or AWS Cloud Map. Required if use_acm_certificate_for_ssl is set to true or ssl_certificate_file and ssl_key_file is AWS S3 path or discovery_mode is set to aws_cloud_map.
drain_timeoutNoDurationThe wait time for the peer forwarder to complete processing data before shutdown. Default is 10s.

TLS/SSL options for peer forwarder

OptionRequiredTypeDescription
sslNoBooleanEnables TLS/SSL. Default is true.
ssl_certificate_fileConditionallyStringThe SSL certificate chain file path or AWS S3 path. S3 path example s3://<bucketName>/<path>. Required if ssl is true and use_acm_certificate_for_ssl is false. Defaults to config/default_certificate.pem which is the default certificate file. Read more about how the certificate file is generated here.
ssl_key_fileConditionallyStringThe SSL key file path or AWS S3 path. S3 path example s3://<bucketName>/<path>. Required if ssl is true and use_acm_certificate_for_ssl is false. Defaults to config/default_private_key.pem which is the default private key file. Read more about how the default private key file is generated here.
ssl_insecure_disable_verificationNoBooleanDisables the verification of server’s TLS certificate chain. Default is false.
ssl_fingerprint_verification_onlyNoBooleanDisables the verification of server’s TLS certificate chain and instead verifies only the certificate fingerprint. Default is false.
use_acm_certificate_for_sslNoBooleanEnables TLS/SSL using certificate and private key from AWS Certificate Manager (ACM). Default is false.
acm_certificate_arnConditionallyStringThe ACM certificate ARN. The ACM certificate takes preference over S3 or a local file system certificate. Required if use_acm_certificate_for_ssl is set to true.
acm_private_key_passwordNoStringThe ACM private key password that decrypts the private key. If not provided, Data Prepper generates a random password.
acm_certificate_timeout_millisNoIntegerThe timeout in milliseconds for ACM to get certificates. Default is 120000.
aws_regionConditionallyStringThe AWS region to use ACM, S3 or AWS Cloud Map. Required if use_acm_certificate_for_ssl is set to true or ssl_certificate_file and ssl_key_file is AWS S3 path or discovery_mode is set to aws_cloud_map.

Authentication options for peer forwarder

OptionRequiredTypeDescription
authenticationNoMapThe authentication method to use. Valid options are mutual_tls (use mTLS) or unauthenticated (no authentication). Default is unauthenticated.

Circuit breakers

Data Prepper provides a circuit breaker to help prevent exhausting Java memory. And is useful when pipelines have stateful processors as these can retain memory usage outside of the buffers.

When a circuit breaker is tripped, Data Prepper rejects incoming data routing into buffers.

OptionRequiredTypeDescription
heapNoheapEnables a heap circuit breaker. By default, this is not enabled.

Heap circuit breaker

Configures Data Prepper to trip a circuit breaker when JVM heap reaches a specified usage threshold.

OptionRequiredTypeDescription
usageYesBytesSpecifies the JVM heap usage at which to trip a circuit breaker. If the current Java heap usage exceeds this value then the circuit breaker will be open. This can be a value such as 6.5gb.
resetNoDurationAfter tripping the circuit breaker, no new checks are made until after this time has passed. This effectively sets the minimum time for a breaker to remain open to allow for clearing memory. Defaults to 1s.
check_intervalNoDurationSpecifies the time between checks of the heap size. Defaults to 500ms.