Connecting elasticsearch cluster
Connecting to elastic cluster
To connect to elastic cluster you must provide location to all cluster nodes. To configure Tracardi connection to elastic change ELASTIC_HOST in docker-standalone.yaml file.
If your cluster is behind a reverse proxy you will need only one url.
SSL and Authentication
You can configure Tracardi to use SSL for connecting to your elasticsearch cluster. Use RFC-1738 to specify the urls:
There is another way to connect to elastic cluster.
To include certificate verification and HTTP type the following line:
Connect using API_KEY
Elasticsearch Service supports API key-based authentication.
To obtain an API key:
- Log in to the Elasticsearch Service Console.
- Select your deployment on the home page in the Elasticsearch Service card or go to the deployments page.
- Under the Features tab, open the API keys page. Any keys currently associated with your account are listed.
- Select Generate API key.
- Provide a name and select Generate API key.
- Copy the generated API key and store it in a safe place. You can also download the key as a CSV file.
The API key has no expiration, so it may be used indefinitely. The API key has the same permissions as the API key owner. You may have multiple API keys for different purposes and you can revoke them when you no longer need them.
Here is the configuration for connection with API_KEY
Connect using CLOUD_ID
Here is the configuration for connection with CLOUD_ID. With COULD_ID you do not need the hosts or port number.
If your instance of elasticsearch or opensearch has certs that can not be verified set ELASTIC_VERIFY_CERTS to
Other connection types
If there is a need for more advanced connection configuration the change in /app/globals/elastic_client.py should handle all mare advanced connection types from Tracardi to elastic.