Revision as of 18:58, January 27, 2017 by KrisMcG (talk | contribs) (Update with the copy of version: 8.5.2DRAFT)
Jump to: navigation, search

Elasticsearch

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.

Important
Genesys recommends that you use a standalone Elasticsearch cluster for new deployments of Web Services. Contact your Genesys representative for information about how to migrate from embedded to standalone.

Prerequisites

Start
Complete the following steps for each Web Services node:

  1. 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
  2. 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.
  3. 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.
  4. If your deployment uses statistics, make sure you complete the reporting configuration steps, including setting the nodeId.
  5. Set the crClusterName option to the name of the cluster. All Web Services nodes with the same cluster name will form the cluster.
  6. 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.
  7. 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.

Important
Genesys does not recommend using an embedded Elasticsearch cluster in a production environment. Contact your Genesys representative for information about how to migrate from embedded to standalone.

Complete the following steps for each Web Services node that you want to host Elasticsearch:

Start

  1. 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
  2. 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:
    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
    Don't forget to update <absolute_path_to_web_services_home/elasticsearch> and <absolute_path> to the appropriate values.
  3. In your new elasticsearch folder, add a new subfolder called templates. For example: web-services/elasticsearch/templates
  4. Copy all the files from the installation_CD/elasticsearch/templates/ to your new /elasticsearch/templates folder.
  5. 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.
  6. If your deployment uses statistics, make sure you complete the reporting configuration steps, including setting the nodeId.
  7. Set the crClusterName option to the name of the cluster. All Web Services nodes with the same cluster name will form the cluster.
  8. 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.
  9. Set the elasticSearchSettings option to appropriate values for your environment.

End

Next Step

Comments or questions about this documentation? Contact us for support!