Solr logo

Apache Solr Telegraf Plugin

Solr logo

Solr is an open-source search platform from the Apache Lucene project, and is written in Java. It includes full-text search, spell-checking, hit highlighting, faceted search, real-time indexing, dynamic clustering, and database integration, NoSQL features and rich document handling make it easy for developers to build high-performance search applications.

Why use a Telegraf plugin for Apache Solr?

Since Solr is used to provide high-performance search in your application, keeping this component performant and available is important. Therefore, monitoring is crucial. Administration and monitoring can be performed using the Solr Telegraf plugin which collects stats when they are exposed via the MBean Request Handler. These stats are per core and are the same information provided on the Plugin/Stats page of the Solr Admin UI. This page shows information and statistics about the status and performance of various plugins running in each Solr core. Information about the performance of the Solr caches, the state of Solr’s searchers, and the configuration of Request Handlers and Search Components are all available to collect with this Telegraf plugin for storage and visualization in InfluxDB.

How to monitor Apache Solr using the Telegraf plugin

The Apache Solr Telegraf plugin collects metrics via the MBean Request Handler. You simply configure Telegraf with a list of Solr servers, a list of Solr cores, and your credentials. The following is an example of the metrics collected:

➜ ~ telegraf -config telegraf.conf -input-filter solr -test
* Plugin: solr, Collection 1
> solr_core,core=main,handler=searcher,host=testhost deleted_docs=17616645i,max_docs=261848363i,num_docs=244231718i 1478214949000000000
> solr_core,core=main,handler=core,host=testhost deleted_docs=0i,max_docs=0i,num_docs=0i 1478214949000000000
> solr_queryhandler,core=main,handler=/replication,host=testhost 15min_rate_reqs_per_second=0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000444659081257,5min_rate_reqs_per_second=0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014821969375,75th_pc_request_time=16.484211,95th_pc_request_time=16.484211,999th_pc_request_time=16.484211,99th_pc_request_time=16.484211,avg_requests_per_second=0.0000008443809966322143,avg_time_per_request=12.984811,errors=0i,handler_start=1474662050865i,median_request_time=11.352427,requests=3i,timeouts=0i,total_time=38.954433 1478214949000000000
> solr_queryhandler,core=main,handler=/update/extract,host=testhost 15min_rate_reqs_per_second=0,5min_rate_reqs_per_second=0,75th_pc_request_time=0,95th_pc_request_time=0,999th_pc_request_time=0,99th_pc_request_time=0,avg_requests_per_second=0,avg_time_per_request=0,errors=0i,handler_start=0i,median_request_time=0,requests=0i,timeouts=0i,total_time=0 1478214949000000000
> solr_queryhandler,core=main,handler=org.apache.solr.handler.component.SearchHandler,host=testhost 15min_rate_reqs_per_second=0,5min_rate_reqs_per_second=0,75th_pc_request_time=0,95th_pc_request_time=0,999th_pc_request_time=0,99th_pc_request_time=0,avg_requests_per_second=0,avg_time_per_request=0,errors=0i,handler_start=1474662050861i,median_request_time=0,requests=0i,timeouts=0i,total_time=0 1478214949000000000
> solr_queryhandler,core=main,handler=/tvrh,host=testhost 15min_rate_reqs_per_second=0,5min_rate_reqs_per_second=0,75th_pc_request_time=0,95th_pc_request_time=0,999th_pc_request_time=0,99th_pc_request_time=0,avg_requests_per_second=0,avg_time_per_request=0,errors=0i,handler_start=0i,median_request_time=0,requests=0i,timeouts=0i,total_time=0 1478214949000000000
[…]

Key Apache Solr metrics to use for monitoring

Some of the important Apache Solr metrics that you should proactively monitor include:

  • Memory utilization
  • Thread usage details
    • waiting threads, blocked threads, terminated threads, peak threads, etc.
  • How well the query handler is processing incoming requests search
    • requests per minute, search errors per minute, search timeouts per minute
  • Cache level details
    • lookups, hit ration, evictions, and cache size
  • How the update handler is handling update requests
    • number of commits, rollbacks, the documents that are added/deleted, the pending documents, the errors per minute, etc.

For more information, please check out the documentation.

Project URL   Documentation

Related Resources

Infrastructure and application monitoring

The solution to monitor your entire infrastructure stack, including servers, containers, databases and cloud services.

Apache Aurora Telegraf Plugin

Read how the Aurora Input Plugin gathers metrics from Apache Aurora.

InfluxData’s contribution to Apache Arrow

Read about InfluxData’s development of a Go implementation of Apache Arrow.

Scroll to Top