Monitoring and collecting data from Solr

Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world’s largest Internet sites.

More information on: http://lucene.apache.org/solr/

How it works

The plugin can get statistics about Solr collections using the JMX interface. It captures queries and requests statistics, as well as used resources information (CPU load, memory size, swap, etc).

The minimal supported version of Solr is 5.2.0

Installation

The plugin needs to be installed together with a CoScale agent, instructions on how to install the CoScale agent can be found here. If you want to monitor Solr inside Docker containers using CoScale, check out the instructions here.

Configuration

Enable JMX

In the solrconfig.xml file of a core/collection (e.g.: {install_dir}/server/solr/gettingstarted/conf/solrconfig.xml) place this directive:

<jmx />

and start the Solr server by explicitly allowing access to JMX: bin/solr start -a -Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false

Provide configuration

Fill in the hostname and the JMX port.

Active checks

This plugin can be configured to perform a HTTP GET on your Solr. This active monitoring allows us to calculate the uptime of the service and the response time of the provided URL.

A full URL (eg. http://localhost:8983/solr/gettingstarted/select?q=*&wt=json) should be provided.

Metrics

Solr

Name Unit Dimensions
Number of seconds that the Solr server has been up s Collection, Handler
Solr active check latency s  
Solr active check uptime %  
Solr auto commits per second req/s Collection, Handler
Solr cache evictions per second req/s Collection, Cache
Solr cache hit ratio % Collection, Cache
Solr cache inserts per second req/s Collection, Cache
Solr commits per second req/s Collection, Handler
Solr ConcurrentMarkSweep garbage collector collection count # Collection, Handler
Solr ConcurrentMarkSweep garbage collector collection time s Collection, Handler
Solr CPU Time s Collection, Handler
Solr deleted docs per second doc/s Collection, Handler
Solr deletes by id per second req/s Collection, Handler
Solr deletes by query per second req/s Collection, Handler
Solr docs per second doc/s Collection, Handler
Solr errors per second req/s Collection, Handler
Solr free physical memory size b Collection, Handler
Solr free swap space size b Collection, Handler
Solr heap memory size b Attribute
Solr highlight per second req/s Collection, Handler
Solr non heap memory size b Attribute
Solr ParNew garbage collector collection count # Collection, Handler
Solr ParNew garbage collector collection time s Collection, Handler
Solr Process CPU Load load Collection, Handler
Solr requests per second req/s Collection, Handler
Solr select time per request s Collection, Handler
Solr soft auto commits per second req/s Collection, Handler
Solr System CPU Load load Collection, Handler
Solr System load average   Collection, Handler
Solr threading daemon thread count threads Collection, Handler
Solr threading Peak thread count threads Collection, Handler
Solr threading thread count threads Collection, Handler
Solr threading total started thread count threads Collection, Handler
Solr total swap space size b Collection, Handler

Events

Name Description Attributes
SOLR service state watcher State watcher status