Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Monitoring Elasticsearch

You're reading from  Monitoring Elasticsearch

Product type Book
Published in Jul 2016
Publisher Packt
ISBN-13 9781784397807
Pages 180 pages
Edition 1st Edition
Languages
Authors (3):
Dan Noble Dan Noble
Profile icon Dan Noble
Pulkit Agrawal Pulkit Agrawal
Mahmoud Lababidi Mahmoud Lababidi
View More author details

Chapter 2. Installation and the Requirements for Elasticsearch

The Java Runtime Environment (JRE) is the only requirement to run Elasticsearch.

The official Elasticsearch documentation recommends that you use either Oracle Java 8 (update 20 or later), or Oracle Java 7 (update 55 or later). Once you choose your version of the JRE, we recommend that all your nodes use the same version to maintain compatibility. Using different versions of Java across your cluster or using Java versions earlier than the ones specified here, can lead to data corruption. Once you choose a version of Elasticsearch, all the nodes in your cluster should use the same version.

While it is possible to run Elasticsearch on both Windows and Linux, this book focuses on using it exclusively in a Linux environment. The Elasticsearch documentation is centered on Linux and most of the Elasticsearch community runs the software on Linux. However, there is no reason a production cluster of Elasticsearch cannot run on Windows.

This...

Installing Elasticsearch


At the time of writing this book, Elasticsearch 2.3.2 is the current stable release and Elasticsearch 5 is in alpha testing. For production clusters, we recommend using the 2.3.2 release and quickly updating to the 5 general availability (GA) release once it is available. Note that while Elasticsearch 5 is compatible with indices created in Elasticsearch 2.x, there have also been some API changes and feature deprecations after the 1.x release. Readers should account for these important changes before upgrading. More details on upgrading from 2.x to 5 can be found on the Elastic website at the following URLS:

Notable API changes include the following:

  • Indices from Elasticsearch 1.x must first be upgraded to 2.x before finally moving to version 5

  • The deprecated filtered, or, and and queries were removed in favor of the bool, must, and should...

Configuring an Elasticsearch cluster


This section will cover some basic Elasticsearch configuration in addition to a few changes that will positively impact your cluster's performance.

Most Elasticsearch configuration changes will be applied to elasticsearch.yml. For our installation of Elasticsearch on Ubuntu, this file is located at /etc/elasticsearch/elasticsearch.yml. Elasticsearch internal configuration changes are applied to elasticsearch.yml. Environmental variables can be set in the application's startup script. For our installation of Elasticsearch 2.3.2 on Ubuntu, these files are in the following locations:

  • Internal Configuration is located at

    /etc/elasticsearch/ elasticsearch.yml

  • Environmental Variable Configuration is located at

    /etc/defau lts/elasticsearch

Cluster name

A wonderful thing about Elasticsearch is the ease with which you can build a cluster. Elasticsearch nodes on the same local area network (LAN) will automatically form a cluster with each other if they have the...

Understanding your cluster


Elasticsearch has many different moving parts, and it can get a little complicated to ensure that everything runs properly. Fortunately, there are some great open source monitoring tools that are available to help you keep tabs on your cluster. This section will cover how to install some of the most popular and useful monitoring tools on your cluster, and the following two chapters will go into these tools in more detail.

Installing Elasticsearch-head

Elasticsearch-head is a simple, free, open source tool that provides a high-level examination of your cluster. It is one of the most useful tools used when administering and monitoring the health of a cluster. Elasticsearch-head only needs to be installed on one node in your cluster. However, we recommend installing it on all nodes for redundancy. It's installed as an Elasticsearch plugin.

If you have an Internet connection, you can install Elasticsearch-head with the Elasticsearch plugin utility, as follows:

sudo /usr...

Cluster requirements


The requirements for your cluster—the number of nodes and the hardware specifications of each node—depend on several factors, including the following:

  • Total volume of data

  • Data ingest rate

  • Average record size

  • Data mapping

  • Types of queries being run

  • System performance requirements

There's no one size fits all formula to determine cluster requirements for a given Elasticsearch use case. The best approach is to meticulously test performance while changing variables, such as shard size, the number of nodes in the cluster, and hardware configurations until an optimal solution is found. This section focuses on high-level guidelines to consider when configuring your cluster.

It's a good idea to run at least three nodes in a production environment and to set data replication to 1, which asks Elasticsearch to maintain one copy of each shard in the cluster. This configuration will ensure that if a node goes down, your cluster won't lose any data.

Elasticsearch tends to be more memory intensive...

Summary


This chapter covered Elasticsearch installation, configuration, monitoring tools, and cluster requirements. Tools such as Elasticsearch-head, Bigdesk, and Marvel all lay the groundwork to monitor your cluster and analyze its performance. However, you still have to know what aspects to look for and how to find them. In the next chapter, we will examine Elasticsearch-head and Bigdesk further, and discuss important things to look for in these tools when monitoring an Elasticsearch cluster.

lock icon The rest of the chapter is locked
You have been reading a chapter from
Monitoring Elasticsearch
Published in: Jul 2016 Publisher: Packt ISBN-13: 9781784397807
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}