Elasticsearch
Contents
Web Services uses Elasticsearch — an open-source, full-text search engine with a RESTful web interface — to store both real-time and historical statistics. Real-time statistics reflect the current state of the object (User, Queue, Skill), while historical statistics are stored as time-based events.
For new deployments, Genesys recommends that you set up a cluster of Elasticsearch nodes that is separate from your Web Services nodes. See Configuring Web Services to use a standalone Elasticsearch cluster for details. It's possible to set up an embedded Elasticsearch cluster, which means that Elasticsearch is included in your Web Services nodes. Note: Genesys does not recommend using this approach in a production environment. See Configuring Web Services to use an embedded Elasticsearch cluster for details.
Configuring Web Services to use a standalone Elasticsearch cluster
You can configure Web Services to work with a standalone Elasticsearch cluster by completing the steps below.
Prerequisites
- You have deployed and configured a cluster of Elasticsearch nodes. Refer to the Elasticsearch documentation for details. Note: Genesys recommends that you use the latest stable 1.x version of Elasticsearch.
Start
Complete the following steps for each Web Services node:
- Update the elastisearch.yml configuration file. You created this file (or Web Services created it for you) as part of Deploying the web application (you can find it in the $JETTY_HOME/genconfig folder if you're installing Web Services and Applications version 8.5.201.09 or earlier). Open the file in a text editor and add the following lines:
index.analysis.analyzer.whitespace_lowercase.tokenizer: whitespace index.analysis.analyzer.whitespace_lowercase.filter: lowercase threadpool.index.queue_size: -1 threadpool.bulk.queue_size: -1
- Copy all the files from the installation_CD/elasticsearch/templates/ folder to the templates directory of the configuration folder (ex. /etc/elasticsearch/templates) on each node in your Elasticsearch cluster.
- Web Services keeps Elasticsearch in sync with Cassandra and removes statistical data for deleted objects by performing index verification. By default, Web Services runs index verification when its node is started, but you can also configure scheduled index verification by setting enableScheduledIndexVerification to true in the elasticSearchSettings option. By default, the index verification takes place every 720 minutes (12 hours), but you can change this timing by setting indexVerificationInterval in elasticSearchSettings. Note: Genesys recommends that you only configure one Web Services node for index verification to avoid excessive requests to Elasticsearch and Cassandra.
- If your deployment uses statistics, make sure you complete the reporting configuration steps, including setting the nodeId.
- Set the crClusterName option to the name of the cluster. All Web Services nodes with the same cluster name will form the cluster.
- Set the enableElasticSearchIndexing option to true. Note: In this case, Web Services writes statistics values to both Elasticsearch and Cassandra, but only reads them from Elasticsearch.
- Set the elasticSearchSettings option to appropriate values for your environment.
End
Configuring Web Services to use an embedded Elasticsearch cluster
You can configure Web Services to work with an embedded Elasticsearch cluster by completing the steps below.
Complete the following steps for each Web Services node that you want to host Elasticsearch:
Start
- Since each index that Elasticsearch uses requires custom mapping, you need to place these mappings in the Web Services home folder you created as part of Deploying the web application. Create a new folder called elasticsearch. For example: web-services/elasticsearch
- Update the elastisearch.yml configuration file. You should have created this file (or Web Services created it for you) as part of Deploying the web application. Open the file in a text editor and add the following lines:
Don't forget to update <absolute_path_to_web_services_home/elasticsearch> and <absolute_path> to the appropriate values.
index.analysis.analyzer.whitespace_lowercase.tokenizer: whitespace index.analysis.analyzer.whitespace_lowercase.filter: lowercase path.conf: <absolute_path_to_web_services_home/elasticsearch> path.data: <absolute_path>/esdata
- In your new elasticsearch folder, add a new subfolder called templates. For example: web-services/elasticsearch/templates
- Copy all the files from the installation_CD/elasticsearch/templates/ to your new /elasticsearch/templates folder.
- Web Services keeps Elasticsearch in sync with Cassandra and removes statistical data for deleted objects by performing index verification. By default, Web Services runs index verification when its node is started, but you can also configure scheduled index verification by setting enableScheduledIndexVerification to true in the elasticSearchSettings option. By default, the index verification takes place every 720 minutes (12 hours), but you can change this timing by setting indexVerificationInterval in elasticSearchSettings. Note: Genesys recommends that you only configure one Web Services node for index verification to avoid excessive requests to Elasticsearch and Cassandra.
- If your deployment uses statistics, make sure you complete the reporting configuration steps, including setting the nodeId.
- Set the crClusterName option to the name of the cluster. All Web Services nodes with the same cluster name will form the cluster.
- Set the enableElasticSearchIndexing option to true. Note: In this case, Web Services writes statistics values to both Elasticsearch and Cassandra, but only reads them from Elasticsearch.
- Set the elasticSearchSettings option to appropriate values for your environment.
End
