For the complete documentation index, see llms.txt.
Skip to main content
Version: 8.10 (unreleased)

OpenSearch exporter

note

For supported OpenSearch versions in Camunda 8 Self-Managed, see Supported Environments.

Starting with Camunda 8.8, Camunda uses the Camunda exporter to consume new records. Records from 8.7 and earlier are consumed only during migration.

The Elasticsearch and OpenSearch exporters remain fully usable after migration (for example, for existing setups, Optimize, or other custom use cases). Their functionality is not limited to the migration period.

From 8.9 onward, the OpenSearch exporter also supports Optimize-focused export filters (for example, variable-name filters, variable-type filters, BPMN process include/exclude, and an Optimize mode flag).

For Optimize-specific guidance and recommended settings, see Camunda 8 system configuration.

The Zeebe OpenSearch exporter acts as a bridge between Zeebe and OpenSearch by exporting records written to Zeebe streams as documents into several indices.

Concept

The exporter operates on the idea that it should perform as little as possible on the Zeebe side of things. In other words, you can think of the indexes into which the records are exported as a staging data warehouse. Any enrichment or transformation on the exported data should be performed by your own ETL jobs.

When configured to do so, the exporter will automatically create an index per record value type (see the value type in the Zeebe protocol). Each of these indexes has a corresponding pre-defined mapping to facilitate data ingestion for your own ETL jobs. You can find those as templates in this module's resources folder.

note

The indexes are created as required, and will not be created twice if they already exist. However, once disabled, they will not be deleted (that is up to the administrator). Similarly, data is never deleted by the exporter, and must be deleted by the administrator when it is safe to do so.

Configuration

note

As the exporter is packaged with Zeebe, it is not necessary to specify a jarPath.

The exporter can be enabled by configuring it with the classpath in the broker settings.

For a Spring Boot application or Camunda 8 with unified configuration:

Application config (YAML):

camunda:
data:
exporters:
opensearch:
className: io.camunda.zeebe.exporter.opensearch.OpensearchExporter
args:
# Refer to the table below for the available args options

Environment variables:

Set environment variables in the format CAMUNDA_DATA_EXPORTERS_OPENSEARCH_... (for example, CAMUNDA_DATA_EXPORTERS_OPENSEARCH_URL).

Helm:

Add the same configuration under orchestration.configuration in your values.yaml file.

warning

Do not configure both legacy (zeebe.broker.exporters.*) and unified (camunda.data.exporters.*) exporter properties at the same time. Exporter properties are a breaking-change mapping in unified configuration, and the application fails to start until legacy properties are removed.

The exporter can be configured by providing args. The table below explains all the different options, and the default values for these options:

OptionDescriptionDefault
urlValid URLs as a comma-separated string.http://localhost:9200
request-timeout-msRequest timeout (in ms) for the OpenSearch client.30000
indexRefer to index for index configuration options, including record/value-type switches, Optimize-focused filters, and the Optimize mode flag.
bulkRefer to bulk for the bulk configuration options.
retentionRefer to retention for the retention configuration options.
authenticationRefer to authentication for the authentication configuration options.
awsRefer to AWS for the AWS configuration options.
include-enabled-recordsIf true, exports all enabled record types configured under index. If optimize-mode-enabled is true, Optimize mode takes precedence. Use mainly for migration or compatibility scenarios.false

In most cases, you will not be interested in exporting every single record produced by a Zeebe cluster, but rather only a subset of them. This can also be configured to limit the kinds of records exported (for example, only events, no commands), and the value type of these records (for example, only job and process values).

OptionDescriptionDefault
bpmnProcessIdExclusionExcludes all records with these BPMN process IDs. Exclusion wins over inclusion.[]
bpmnProcessIdInclusionRestricts exported records to these BPMN process IDs. If empty, all processes are included. Value types without a bpmnProcessId (such as DEPLOYMENT, DECISION) are not affected by this filter.[]
checkpointIf true records related to checkpoints will be exported.false
commandIf true command records will be exported.false
command-distributionIf true records related to command distributions will be exported.true
create-templateIf true missing indexes will be created automatically.true
decisionIf true records related to decisions will be exported.true
decision-evaluationIf true records related to decision evaluations will be exported.true
decision-requirementsIf true records related to decision requirements will be exported.true
deploymentIf true records related to deployments will be exported.true
deployment-distributionIf true records related to deployment distributions will be exported.true
errorIf true records related to errors will be exported.true
escalationIf true records related to escalations will be exported.true
eventIf true event records will be exported.true
exportLocalVariablesEnabledIf false, local (child-scope) variables are not exported. Root variables are scoped to the process instance; local variables are scoped to sub-processes, call activities, and tasks. When all scope-specific lists are empty, global variableName* and variableValueType* filters apply to all variables. When any scope-specific list is non-empty, that scope uses both its own filters and the global filters.true
formIf true records related to forms will be exported.true
incidentIf true records related to incidents will be exported.true
jobIf true records related to jobs will be exported.true
job-batchIf true records related to job batches will be exported.false
localVariableNameExclusionEndWithExcludes local variables whose names end with these suffixes. Exclusion wins over inclusion.[]
localVariableNameExclusionExactExcludes local variables whose names exactly match. Exclusion wins over inclusion.[]
localVariableNameExclusionStartWithExcludes local variables whose names start with these prefixes. Exclusion wins over inclusion.[]
localVariableNameInclusionEndWithIncludes local variables whose names end with these suffixes. If empty, no local name inclusion filter applies.[]
localVariableNameInclusionExactIncludes local variables whose names exactly match. If empty, no local name inclusion filter applies.[]
localVariableNameInclusionStartWithIncludes local variables whose names start with these prefixes. If empty, no local name inclusion filter applies.[]
localVariableValueTypeExclusionExcludes local variables of these inferred JSON types. Exclusion wins over inclusion.[]
localVariableValueTypeInclusionRestricts exported local variables to these inferred JSON types (String, Number, Boolean, Object, Null).[]
messageIf true records related to messages will be exported.true
message-batchIf true records related to message batches will be exported.false
message-start-event-subscriptionIf true records related to message start event subscriptions will be exported.true
message-subscriptionIf true records related to message subscriptions will be exported.true
number-of-replicasThe number of shard replicas used for each new record index created.0
number-of-shardsThe number of shards used for each new record index created.3
optimizeModeEnabledIf true, restricts exported record types to those consumed by Optimize. Other value types are dropped. Use only when these indices are dedicated to Optimize.false
prefixThis prefix will be appended to every index created by the exporter; must not contain _ (underscore).zeebe-record
processIf true records related to processes will be exported.true
process-eventIf true records related to process events will be exported.false
process-instanceIf true records related to process instances will be exported.true
process-instance-batchIf true records related to process instances batches will be exported.false
process-instance-creationIf true records related to process instance creations will be exported.true
process-instance-migrationIf true records related to process instance migrations will be exported.true
process-instance-modificationIf true records related to process instance modifications will be exported.true
process-message-subscriptionIf true records related to process message subscriptions will be exported.true
rejectionIf true rejection records will be exported.false
resource-deletionIf true records related to resource deletions will be exported.true
rootVariableNameExclusionEndWithExcludes root variables whose names end with these suffixes. Exclusion wins over inclusion.[]
rootVariableNameExclusionExactExcludes root variables whose names exactly match. Exclusion wins over inclusion.[]
rootVariableNameExclusionStartWithExcludes root variables whose names start with these prefixes. Exclusion wins over inclusion.[]
rootVariableNameInclusionEndWithIncludes root variables whose names end with these suffixes. If empty, no root name inclusion filter applies.[]
rootVariableNameInclusionExactIncludes root variables whose names exactly match. If empty, no root name inclusion filter applies.[]
rootVariableNameInclusionStartWithIncludes root variables whose names start with these prefixes. If empty, no root name inclusion filter applies.[]
rootVariableValueTypeExclusionExcludes root variables of these inferred JSON types. Exclusion wins over inclusion.[]
rootVariableValueTypeInclusionRestricts exported root variables to these inferred JSON types (String, Number, Boolean, Object, Null).[]
signalIf true records related to signals will be exported.true
signal-subscriptionIf true records related to signal subscriptions will be exported.true
timerIf true records related to timers will be exported.true
user-taskIf true records related to user tasks will be exported.true
variableIf true records related to variables will be exported.true
variable-documentIf true records related to variable documents will be exported.true
variableNameExclusionEndWithExcludes variables whose names end with these suffixes. Exclusion wins over inclusion.[]
variableNameExclusionExactExcludes variables whose names exactly match. Exclusion wins over inclusion.[]
variableNameExclusionStartWithExcludes variables whose names start with these prefixes. Exclusion wins over inclusion.[]
variableNameInclusionEndWithIncludes variables whose names end with these suffixes. If empty, no name inclusion filter applies.[]
variableNameInclusionExactIncludes variables whose names exactly match. If empty, no name inclusion filter applies. Inclusion rules are evaluated first; if a variable also matches an exclusion rule, exclusion takes precedence.[]
variableNameInclusionStartWithIncludes variables whose names start with these prefixes. If empty, no name inclusion filter applies.[]
variableValueTypeExclusionExcludes variables of these inferred JSON types. Exclusion wins over inclusion.[]
variableValueTypeInclusionRestricts exported variables to these inferred JSON types (String, Number, Boolean, Object, Null). If empty, all types are included. Use to drop large object or array payloads at export time.[]

Example

The following is an example configuration of the exporter:

---
camunda:
data:
exporters:
opensearch:
# Opensearch exporter ----------
# An example configuration for the opensearch exporter:
#
# These settings can also be overridden using environment variables "CAMUNDA_DATA_EXPORTERS_OPENSEARCH_..."

className: io.camunda.zeebe.exporter.opensearch.OpensearchExporter
args:
# A comma separated list of URLs pointing to the Opensearch instances you wish to export to.
# For example, if you want to connect to multiple nodes for redundancy:
# url: http://localhost:9200,http://localhost:9201
url: http://localhost:9200

bulk:
delay: 5
size: 1000
memoryLimit: 10485760

retention:
enabled: true
minimumAge: 30d
policyName: zeebe-records-retention-policy
policyDescription: Zeebe records retention policy

authentication:
username: opensearch
password: changeme

aws:
enabled: true
serviceName: es
region: eu-west-1

index:
prefix: zeebe-record
createTemplate: true

command: false
event: true
rejection: false

commandDistribution: true
decisionRequirements: true
decision: true
decisionEvaluation: true
deployment: true
deploymentDistribution: true
error: true
escalation: true
form: true
incident: true
job: true
jobBatch: false
message: true
messageStartEventSubscription: true
messageSubscription: true
process: true
processEvent: false
processInstance: true
processInstanceCreation: true
processInstanceMigration: true
processInstanceModification: true
processMessageSubscription: true
resourceDeletion: true
signal: true
signalSubscription: true
timer: true
userTask: true
variable: true
variableDocument: true

Self-signed certificates

The Zeebe OpenSearch exporter does not currently support connecting to OpenSearch using self-signed certificates. If you must use self-signed certificates, it is possible to build your own trust store and have the application use it.

In this case, it is recommended to create a new custom trust store based on the default one. This way, it will also be able to verify certificates signed using trusted root certificate authorities.

  1. First, create a new custom trust store which contains the same data as the default one, using PKCS12 format. To do so, find the location of the default cacerts trust store:

    • On Linux systems, find it at $JAVA_HOME/lib/security/cacerts.
    • For macOS, find it under $(/usr/libexec/java_home)/jre/lib/security/cacerts.

    Once you have the right location, for example, $JAVA_HOME/lib/security/cacerts, run the following to create a new trust store:

    keytool -importkeystore -srckeystore $JAVA_HOME/lib/security/cacerts -destkeystore zeebeTrustStore.jks -srcstoretype PKCS12 -deststoretype JKS

    Set any password, so long as it's at least 6 characters.

  2. Add your custom certificate to to the new trust store. For example, if your custom certificate is located at /tmp/myCustomCertificate.pem:

    keytool -import -alias MyCustomCertificate -keystore zeebeTrustStore.jks -file /tmp/myCustomCertificate.pem
    note

    Replace the -file parameter with the actual path to your certificate, and make sure to replace the -alias parameter with something descriptive, like WebServerCertificate.

    When prompted to trust the certificate, make sure to answer yes.

  3. Update the application to use this trust store. First, make sure the file is readable by the application. For example, on Unix systems, run:

    chmod a+r zeebeTrustStore.jks

    Then, specify the following properties when running the application:

    • javax.net.ssl.trustStore: must be set to the path of your custom trust store.
    • javax.net.ssl.trustStorePassword: set to your trust store password.

    The following example uses a trust store location of /tmp/zeebeTrustStore.jks, and a password of changeme. When using the official distribution (whether Docker image or the bundled shell scripts), these propertiescan be provided using the following environment variable:

    JAVA_OPTS="-Djavax.net.ssl.trustStore=/tmp/zeebeTrustStore.jks -Djavax.net.ssl.trustStorePassword=changeme ${JAVA_OPTS}"
warning

If you're using containers, you will need to mount the trust store to the container such that it can be found by the java process. This will depend on your deployment method (for example, Helm chart, Docker Compose). The simplest way is to build a custom image which already contains your trust store, and specifies the environment variable.

Legacy Zeebe records and Optimize filters

With the introduction of the Camunda exporter, the Elasticsearch and OpenSearch exporters no longer export all record types by default. By default, they emit only the record value types and intents required by Optimize.

To export additional record types, enable the include-enabled-records configuration property.

When you enable exporter-side filters (optimize-mode-enabled, variable-name, variable-type, or bpmn-process-id), filtering applies only to newly produced records. Existing documents in Elasticsearch or OpenSearch are not rewritten.

To export other record types, enable the include-enabled-records configuration property.

Upgrade note (8.8 to 8.9)

When upgrading from 8.8 to 8.9, exporter filtering behavior may affect data completeness. See the Camunda 8 system configuration for guidance.