Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
Administrating Solr
Administrating Solr

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

Arrow left icon
Profile Icon Surendra Mohan
Arrow right icon
Free Trial
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1 (1 Ratings)
Paperback Oct 2013 120 pages 1st Edition
eBook
S$12.99 S$42.99
Paperback
S$52.99
Subscription
Free Trial
Arrow left icon
Profile Icon Surendra Mohan
Arrow right icon
Free Trial
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1 (1 Ratings)
Paperback Oct 2013 120 pages 1st Edition
eBook
S$12.99 S$42.99
Paperback
S$52.99
Subscription
Free Trial
eBook
S$12.99 S$42.99
Paperback
S$52.99
Subscription
Free Trial

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
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 : 9781783283255
Category :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

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 S$6 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 S$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total S$12.99 S$42.99 S$30.00 saved
Administrating Solr
S$52.99
Total S$12.99S$42.99 S$30.00 saved Stars icon
Banner background image

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 included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.