Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Administrating Solr
Administrating Solr

Administrating Solr: Master the use of Drupal and associated scripts to administrate, monitor, and optimize Solr

eBook
$15.99 $22.99
Paperback
$38.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Administrating Solr

Chapter 2. Monitoring Solr

In the previous chapter, we learned how request and response are handled, different ways by which we can query Solr so as to get the most appropriate and relevant search results, how to use faceting search, searching based on geographical points, and distributed search.

In this chapter, we will cover:

  • Various monitoring metrics

  • Different agent-less health checks

  • Different agent based health checks

  • Various monitoring tools

We will look into different ways we can monitor Solr, what performance metrics should be interested in, and how we can achieve this by using various monitoring tools such as Opsview, New Relic, and SPM.

Let's get started.

Monitoring metrics


Before we get into ways of monitoring, we need to understand a couple of necessary monitoring metrics. We will touch base with these metrics in this section.

Our primary goal of monitoring is to ensure Solr meets the SLA expectations in terms of search and its quality. Solr provides both XML and JMX hooks, which allows you to integrate Solr with your monitoring platform.

Tip

Don't get hassled if you do not have your own monitoring platform! There are three offerings for you from New Relic, Sematext, and Opsview, and they have been covered in the last section of Chapter 3, Managing Solr. They are cloud-based and communicate via a small agent installed into Solr and provide a package of statistics and analysis about the JVM, as well as Solr specific metrics such as request response time and throughput, cache hit rate, and indexing performance.

Stats.jsp

From the admin interface, when you click on the Statistics link, though you receive a web page of information about the specific...

Using password-based authentication


As stated earlier, if you intend to connect to Solr, it is always recommended to use password authentication. This section will guide you with the steps to use password authentication so as to add a security layer between your application and Solr for both single user environment and multiuser environment.

When the JMX agent for remote monitoring is enabled, it uses password authentication. Depending on whether you are a single user, or multiuser, determines the way you set it up.

Tip

It is not advisable to use your regular username and password for monitoring as passwords are stored in clear text in the password file. Instead, use the usernames specified in the password file such as monitorRole and controlRole. For futher reading, refer:

http://docs.oracle.com/javase/1.5.0/docs/guide/management/agent.html#PasswordAccessFiles

Singler-user environment

Set up the password file in the JRE_HOME/lib/management directory by following these instructions:

  1. Copy the...

Agent-less health checks


Before we get into the actual topic, we need to understand what is an agent-less check and later delve into the answer to the question, what should we look for over the network? We define agent-less check as the Solr health check, which can be performed remotely.

The first and the foremost thing we should do is to have a host-level check, which can be expected to perform a network-level ping. Then, we may go for checking TCP connectivity to the servlet container port and then make an HTTP GET request to the Solr front page checking for a known string (for instance, Welcome to Solr Monitoring and Optimization).

Now we can start with performing Solr specific checks by monitoring items which may include:

  • Ping status

  • Number of documents

  • Number and rate (per second) of queries

  • Average response time

  • Number of modifications

  • Cache hit ratio

  • Replication status

  • Synthetic queries

As an example, we will walk-through one of the items from the list (for instance, Ping status).

Ping status...

Agent-based health checks


In the previous section, we have learned about agent-less health checks. That is, checking the health of our Solr server remotely. Here in this section, we will learn about agent based health checks.

Agent based health is defined as the check which can be performed locally and is advanced in nature compared to the agent-less check.

We can even run checks over Nagios Remote Plugin Executor (NRPE), which might operate at operating system level and could include:

  • Memory unitization

  • Disk utilization

  • CPU load

  • Active Java servlet container process

  • JMX checks such as heap memory, custom MBeans and so on.

  • Exception logs

  • Age of a file

The Solr wiki describes how to configure the JMX support, http://wiki.apache.org/solr/SolrJmx.

We will see in detail a few of the agent based monitoring tools such as Opsview, New Relic, and SPM in the Monitoring tools section, which is the last section of the chapter.

Monitoring tools


This section will guide you how to monitor your Solr server using Agent based health checks using robust monitoring tools such as Opsview, New Relic, and SPM.

Opsview

Let us assume that you already have Opsview or Opsview VMWare Appliance installed and have completed the Quick Start guidelines.

If not, don't panic! You may refer http://www.opsview.com/technology/downloads to download the installer of Opsview and/or Opsview VMWare Appliance, and http://docs.opsview.com/doku.php?id=opsview3.14:quickstart for the Quick Start guidelines.

In this section, we will cover how and where to fetch and install the Solr-specific plugin, how to set up service check, host configuration, and understand the check results.

Solr-specific plugin

In this topic, we will guide you on how to install the Solr-specific plugin within a few keyboard hits.

Install the Solr plugin from https://github.com/surendra-mohan/solr-checks-opsview into /usr/local/nagios/libexec/. The solr_check plugin is Perl based...

Summary


In this chapter, we learned different ways of obtaining monitoring metrics (ping, stats.js, JMX MBeans), using password based authentication, agent-less and agent based health checks, and understanding and usage of different monitoring tools such as Opsview, New Relic, and SPM.

In the next chapter, we will learn about Solr basic scripts such as scripts.conf and init script, how to back up your Solr data using replication request handler, and the existing scripts from earlier Solr releases, configuring both temporary as well as permanent Solr logs on Tomcat and Jetty, and collection distribution scripts, which includes configuration of scripts, SSH, and Rsyncd setups.

Left arrow icon Right arrow icon

Key benefits

  • Learn how to work with monitoring tools like OpsView, New Relic, and SPM
  • Utilize Solr scripts and Collection Distribution scripts to manage Solr
  • Employ search features like querying, categorizing, search based on location, and distributed search

Description

Implementing different search engines on web products is a mandate these days. Apache Solr is a robust search engine, but simply implementing Apache Solr and forgetting about it is not a good idea, especially when you have to fight for the search ranking of your web product. In such a scenario, you need to keep monitoring, administrating, and optimizing your Solr to retain your ranking. "Administrating Solr" is a practical, hands-on guide. This book will provide you with a number of clear, step-by-step exercises and some advanced concepts which will help you administrate, monitor, and optimize Solr using Drupal and associated scripts. Administrating Solr will also provide you with a solid grounding on how you can use Apache Solr with Drupal. "Administrating Solr" starts with an overview of Apache Solr and the installation process to get you familiar with Solr. It then gradually moves on to discuss the mysteries that make Solr flexible enough to render appropriate search results in different scenarios. This book will take you through clear and practical concepts that will help you monitor, administrate, and optimize your Solr appropriately using both scripts and tools. This book will also teach you ways to query your search and methods to keep your Solr healthy and well maintained. With this book, you will learn how to effectively implement and optimize Solr using Drupal.

Who is this book for?

"Administrating Solr" is for developers and Solr administrators who have a basic knowledge of Solr and who are looking for ways to keep their Solr server healthy and well maintained. A basic working knowledge of Apache Lucene is recommended, but this is not mandatory.

What you will learn

  • Install Solr and handle requests and responses
  • Utilize various search types like faceted, geospatial, and distributed search
  • Monitor metrics like stats.jsp, Solr with JMX, and password-based authentication both for single-user and multi-user environments
  • Back up your Solr using the Solr Replication Handler and configure your Solr logs
  • Create scripts to configure indexer and slave servers
  • Understand and create business rules using Drools
  • Learn about and configure language detection features like Tika and LangDetect
  • Discover OpenNLP and the activities it can perform including tokenization, sentence splitting, part-of-speech tagging, and so on
  • Implement Apache Solr with Drupal

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 15, 2013
Length: 120 pages
Edition : 1st
Language : English
ISBN-13 : 9781783283262
Category :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Oct 15, 2013
Length: 120 pages
Edition : 1st
Language : English
ISBN-13 : 9781783283262
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 38.99
Administrating Solr
$38.99
Total $ 38.99 Stars icon

Table of Contents

4 Chapters
Searching Data Chevron down icon Chevron up icon
Monitoring Solr Chevron down icon Chevron up icon
Managing Solr Chevron down icon Chevron up icon
Optimizing Solr Tools and Scripts Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
(1 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 100%
Anand Mahajan Jul 26, 2014
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Very little actual content in the book. Not for someone whos experienced with solr. Most of this content is already found online on various posts / forums. Doesnt run you deep into Solr Administration - just scratches the surface I think.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.