Configuration lives in config/connectors.yml
.
Get a copy of configuration with default values:
cp config/connectors.yml.example config/connectors.yml
version
: The version of the connector service application, this will be set automatically when the application runs.repository
: The repository to hold the source code of the connector service application.revision
: The specific revision which the connector service application is built on.elasticsearch
: Elasticsearch connection configurations.cloud_id
: The cloud ID of the Elasticsearch deployment, if it's deployed on Elastic Cloud. Either this orhosts
have to be configured.hosts
: The hosts of the Elasticsearch deployment. This will be ignored ifcloud_id
is configured. Either this orcloud_id
have to be configured.api_key
: The API key to connect to the Elasticsearch server.retry_on_failure
: Number of retries when request fails before raising an exception. Defaults to 3.request_timeout
: The request timeout to be passed to transport in options. Defaults to 120.disable_warnings
: Whether to display warnings in the log. Defaults totrue
.trace
: Whether to use the default tracer. Defaults tofalse
.log
: Whether to use logger when connecting to Elasticsearch. Defaults tofalse
.
thread_pool
: Thread pool configurations.min_threads
: When a new task is submitted and fewer thanmin_threads
are running, a new thread is created. Defaults to0
.max_threads
: The maximum number of threads to be created. Defaults to5
.max_queue
: The maximum number of tasks allowed in the work queue at any one time; a value of zero means the queue may grow without bound. Defaults to100
.
log_level
: Log level. Defaults toinfo
.ecs_logging
: Whether to output the log ECS compatible format, which is required when the application is deployed on Elastic Cloud. Defaults totrue
.poll_interval
: The interval (in seconds) to poll connectors from Elasticsearch. Defaults to3
.termination_timeout
: The maximum number of seconds to wait for the pool shutdown to complete. Defaults to60
.heartbeat_interval
: The interval (in seconds) to send a new heartbeat for a connector. Defaults to1800
.job_cleanup_interval
: The interval (in seconds) to run a job cleanup task. Defaults to300
.native_mode
: Whether to run the application innative mode
. Defaults totrue
.connector_id
: The ID of the connector that the application will sync data for. This is required whennative_mode
isfalse
.service_type
: The service type of the connector that the application will sync data for. This is required whennative_mode
isfalse
.max_ingestion_queue_size
: When number of documents in bulk operation exceeds this number, a bulk request is issued to Elasticsearch. Defaults to500
.max_ingestion_queue_bytes
: When byte size of bulk operation exceeds this number, a bulk request is issued to Elasticsearch. Defaults to5242880
.
When you have an Enterprise Search deployment on Elastic Cloud post 8.5.0, the connector service is automatically deployed. The connector service can only run in native mode on Elastic Cloud (i.e. native_mode
is always true
), and the Elasticsearch connection configurations (i.e. cloud_id
, hosts
, api_key
) will be overridden, and a special Cloud user cloud-internal-enterprise_search-server
will be used for Elasticsearch connection, which will have proper privilege on the connector index (.elastic-connectors
), the connector job index (.elastic-connectors-sync-jobs
) and the connector content indices (search-*
).
- Set
native_mode
totrue
- Generate the API key via Stack Management > Security > API keys > Create API key. Make sure the API key has at least the privileges to
manage
,read
andwrite
the connector index (.elastic-connectors
), the connector job index (.elastic-connectors-sync-jobs
) and the connector content indices (search-*
). - Run the connector service with
make run
Refer to Test your connector for detailed explanation.