Book Image

Monitoring Elasticsearch

By : Dan Noble, Pulkit Agrawal, Mahmoud Lababidi
Book Image

Monitoring Elasticsearch

By: Dan Noble, Pulkit Agrawal, Mahmoud Lababidi

Overview of this book

ElasticSearch is a distributed search server similar to Apache Solr with a focus on large datasets, a schema-less setup, and high availability. This schema-free architecture allows ElasticSearch to index and search unstructured content, making it perfectly suited for both small projects and large big data warehouses with petabytes of unstructured data. This book is your toolkit to teach you how to keep your cluster in good health, and show you how to diagnose and treat unexpected issues along the way. You will start by getting introduced to ElasticSearch, and look at some common performance issues that pop up when using the system. You will then see how to install and configure ElasticSearch and the ElasticSearch monitoring plugins. Then, you will proceed to install and use the Marvel dashboard to monitor ElasticSearch. You will find out how to troubleshoot some of the common performance and reliability issues that come up when using ElasticSearch. Finally, you will analyze your cluster’s historical performance, and get to know how to get to the bottom of and recover from system failures. This book will guide you through several monitoring tools, and utilizes real-world cases and dilemmas faced when using ElasticSearch, showing you how to solve them simply, quickly, and cleanly.
Table of Contents (15 chapters)
Monitoring Elasticsearch
About the Author
About the Reviewers

Understanding the Marvel dashboard

This section covers how to use the Marvel dashboard to better understand the state of your cluster.

To make monitoring our cluster more interesting, we'll stream more Twitter data into it using the stream2es program, and run random queries against the index using a custom bash script described in this section.

See Chapter 3, Elasticsearch-head and Bigdesk for detailed instructions on how to install and use stream2es, but, for quick reference, start stream2es using the following command:

./stream2es twitter --target http://elasticsearch-node-01:9200/twitter/status

Next, we'll simulate user interactions by running random queries against the twitter index. Create a new bash script called with the following content:


# Path to dictionary file

# Total dictionary words
TOTAL_WORDS=`wc -l $DICTIONARY_PATH | awk '{print $1}'`

while :