Revision as of 21:16, December 20, 2016 by Sschlich (talk | contribs) (Update with the copy of version: DRAFT)
Jump to: navigation, search

Elasticsearch

Interaction Recording Web Services (RWS) uses Elasticsearch — an open-source, full-text search engine with a RESTful web interface — to store historical statistics as time-based events.

For new deployments, Genesys recommends that you set up a cluster of Elasticsearch nodes that is separate from your Interaction Recording Web Services nodes. See Configuring Interaction Recording 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 Interaction Recording Web Services nodes. See Configuring Interaction Recording Web Services to Use an Embedded Elasticsearch Cluster for details.

Configuring Interaction Recording Web Services to Use a Standalone Elasticsearch Cluster

You can configure Interaction Recording Web Services to work with a standalone Elasticsearch cluster by completing the steps below.

Important
Contact your Genesys representative for information about how to migrate from embedded to standalone. For additional information, refer to the latest stable 1.x version of Elasticsearch.

Prerequisites

Verify that a cluster of Elasticsearch nodes have been deployed and configured. Refer to the Elasticsearch documentation for details.

Complete the following steps for each Interaction Recording Web Services node

  1. Copy the sample elasticsearch.yml file from the installation_CD/elasticsearch/templates/ folder, to the Elasticsearch configuration folder on a standalone machine. Perform this step for each node in your Elasticsearch cluster.
  2. Open the elasticsearch.yml configuration file in a text editor and verify that the following lines are included in the file:
    index.analysis.analyzer.whitespace_lowercase.tokenizer: whitespace
    index.analysis.analyzer.whitespace_lowercase.filter: lowercase
    threadpool.index.queue_size: -1
    threadpool.bulk.queue_size: -1
    path.conf: <Elasticsearch installation path>
    path.data: <Elasticsearch installation path>/esdata
    transport.tcp.port: 9200
    http.port: 9300
    discovery.zen.ping.multicast.enabled: false
    discovery.zen.ping.unicast.hosts: <comma separated list of ElasticSearch nodes>
    discovery.zen.minimum_master_nodes: 2
    gateway.recover_after_nodes: 2
    gateway.recover_after_time: 1m
    gateway.expected_nodes: 3
  3. In the installation_CD/elasticsearch/ directory there is a templates folder. Copy the templates folder and its .json file contents to the config folder of Elasticsearch in each node in your Elasticsearch cluster. If you use the .rpm for Elasticsearch, this would be /etc/elasticsearch/ as the config folder. If you use the gzipped tarball, this would be under the $installDir/config.
  4. Set the crClusterName option to the name of the cluster. All Interaction Recording Web Services nodes with the same cluster name will form the cluster.
  5. Set the enableElasticSearchIndexing option to true. Note: In this case, Interaction Recording Web Services writes statistics values to both Elasticsearch and Cassandra, but only reads them from Elasticsearch.
  6. Set the elasticSearchSettings option to appropriate values for your environment.
  7. Important
    The Elasticsearch engine requires a large Metaspace space. To increase the Metaspace space, add the following to your JAVA_OPTIONS:
    JAVA_OPTIONS="-XX:MaxMetaspaceSize=512m -Djsse.enableSNIExtension=false"

Configuring Interaction Recording Web Services to Use an Embedded Elasticsearch Cluster

You can configure Interaction Recording Web Services to work with an embedded Elasticsearch cluster by completing the steps below.

Important
Contact your Genesys representative for information about how to migrate from embedded to standalone. For additional information, refer to the latest stable 1.x version of Elasticsearch.

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

  1. Install Elasticsearch on each Interaction Recording Web Services node.
  2. Copy the sample elasticsearch.yml file from the installation_CD/elasticsearch/templates/ folder, to the Elasticsearch configuration folder on the Interaction Recording Web Services node. Perform this step for each node in your Elasticsearch cluster.
  3. Open the elasticsearch.yml configuration file in a text editor and verify that the following lines are included in the file: Note: <Elasticsearch installation path> refers to the location on which Elasticsearch has been installed.
    index.analysis.analyzer.whitespace_lowercase.tokenizer: whitespace
    index.analysis.analyzer.whitespace_lowercase.filter: lowercase
    threadpool.index.queue_size: -1
    threadpool.bulk.queue_size: -1
    path.conf: <Elasticsearch installation path>
    path.data: <Elasticsearch installation path>/esdata
    transport.tcp.port: 9200
    http.port: 9300
    discovery.zen.ping.multicast.enabled: false
    discovery.zen.ping.unicast.hosts: <comma separated list of ElasticSearch nodes>
    discovery.zen.minimum_master_nodes: 2
    gateway.recover_after_nodes: 2
    gateway.recover_after_time: 1m
    gateway.expected_nodes: 3
    Do not forget to update <Elasticsearch installation path> to the appropriate value.
  4. In your new elasticsearch folder, add a new subfolder called templates. For example: ir-web-services/elasticsearch/templates
  5. Copy the templates folder and its .json file contents to the config folder of Elasticsearch in each node in your Elasticsearch cluster. If you use the .rpm for Elasticsearch, this would be /etc/elasticsearch/ as the config folder. If you use the gzipped tarball, this would be under the $installDir/config.
  6. Set the crClusterName option to the name of the cluster. All Interaction Recording Web Services nodes with the same cluster name will form the cluster.
  7. Set the enableElasticSearchIndexing option to true. Note: In this case, Interaction Recording Web Services writes statistics values to both Elasticsearch and Cassandra, but only reads them from Elasticsearch.
  8. Set the elasticSearchSettings option to appropriate values for your environment.
  9. Important
    The Elasticsearch engine requires a large Metaspace space. To increase the Metaspace space, add the following to your JAVA_OPTIONS:
    JAVA_OPTIONS="-XX:MaxMetaspaceSize=512m -Djsse.enableSNIExtension=false"

Next Step

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