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 Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
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

Shipping Address

Billing Address

Shipping Methods
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
Estimated delivery fee Deliver to Russia

Economy delivery 10 - 13 business days

$6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

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 : 9781783283255
Category :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
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

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Russia

Economy delivery 10 - 13 business days

$6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Publication date : Oct 15, 2013
Length: 120 pages
Edition : 1st
Language : English
ISBN-13 : 9781783283255
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

What is the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela