Revision as of 12:11, September 30, 2015 by Jumunn (talk | contribs) (Created page with "= Elasticsearch= __TOC__ Workspace Web Edition & Web Services uses {{#Widget:ExtLink|link=https://www.elastic.co/products/elasticsearch|displaytext=Elasticsearch}} — an ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Elasticsearch

Workspace Web Edition & 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 Workspace Web Edition & Web Services nodes. See Configuring Workspace Web Edition & Web Services to use with a Standalone Elasticsearch Cluster for details. It's possible to set up an embedded Elasticsearch cluster, which means that Elasticsearch is included in your Workspace Web Edition & Web Services nodes. Note: Genesys does not recommend using this approach in a production environment. See Configuring Workspace Web Edition & Web Services to use with an Embedded Elasticsearch Cluster for details.

Configuring Workspace Web Edition & Web Services to Use with a Standalone Elasticsearch Cluster

You can configure Workspace Web Edition & 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 Workspace Web Edition & Web Services. Contact your Genesys representative for information about how to migrate from embedded to standalone.

Prerequisites

Start
Complete the following steps for each Workspace Web Edition & Web Services node:

  1. Update the elastisearch.yml configuration file. You can find a sample version of this file in the folder you created in Step 6 of Deploying the Web Application; to use it, just remove the .sample extension. 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 WWE&WS_installation_package/elasticsearch/templates/ folder to the templates folder of 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 Workspace Web Edition & Web Services 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 Workspace Web Edition & 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 Workspace Web Edition & Web Services to Use with an Embedded Elasticsearch Cluster

You can configure Workspace Web Edition & 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 Workspace Web Edition & 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 Elasticsearch configuration folder on your Workspace Web Edition & Web Services node. Navigate to the configuration folder — this is the $JETTY_HOME/genconfig folder you created in Step 6 of Deploying the Web Application. Create a new folder called esearch. For example: $JETTY_HOME/genconfig/esearch
  2. Update the elastisearch.yml configuration file. You can find a sample version of this file in $JETTY_HOME/genconfig; to use it, just remove the .sample extension. 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_genconfig>/esearch
    path.data: <absolute_path>/esdata

    Don't forget to update <absolute_path_to_genconfig> and <absolute_path> to the appropriate values.

  3. Copy elastisearch.yml to your $JETTY_HOME/resources folder.
  4. In your new $JETTY_HOME/genconfig/esearch folder, add a new subfolder called templates. For example: $JETTY_HOME/genconfig/esearch/templates
  5. Copy all the files from the WWE&WS_installation_package/elasticsearch/templates/ to your new $JETTY_HOME/genconfig/esearch/templates folder.
  6. 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 Workspace Web Edition & Web Services for index verification to avoid excessive requests to Elasticsearch and Cassandra.
  7. If your deployment uses statistics, make sure you complete the reporting configuration steps, including setting the nodeId.
  8. Set the crClusterName option to the name of the cluster. All Workspace Web Edition & Web Services nodes with the same cluster name will form the cluster.
  9. 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.
  10. Set the elasticSearchSettings option to appropriate values for your environment.

End

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