Monitoring Solr

This article will help you get the Solr plugin for sd-agent configured and returning metrics

Installing the solr plugin package

Install the solr plugin on Debian/Ubuntu:

sudo apt-get install sd-agent-solr

Install the solr plugin on RHEL/CentOS:

sudo yum install sd-agent-solr

Read more about agent plugins.

Configuring the agent to monitor Solr

The Solr check makes use of JMX so JMX Remote is required on your Solr servers.

1. Configure /etc/sd-agent/conf.d/solr.yaml

instances:
  - host: localhost
    port: 9999
  #   user: username
  #   password: password
  #   process_name_regex: .*process_name.* # Instead of specifying a host, and port. The agent can connect using the attach api.
  #                                                                       #   This requires the JDK to be installed and the path to tools.jar to be set below.
  #   tools_jar_path: /usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar # To be set when process_name_regex is set
  #   name: solr_instance
  #   # java_bin_path: /path/to/java # Optional, should be set if the agent cannot find your java executable
  #   # java_options: "-Xmx200m -Xms50m" # Optional, Java JVM options
  #   # trust_store_path: /path/to/trustStore.jks # Optional, should be set if ssl is enabled
  #   # trust_store_password: password
  #   tags:
  #     env: stage
  #     newTag: test

Ensure that the options are correct in your yaml file. It's possible to use a process_name_regex instead of a host and port.

2. Restart the agent

sudo /etc/init.d/sd-agent restart

or

sudo systemctl restart sd-agent

Verifying the configuration
Execute info to verify the configuration with the following:

sudo /etc/init.d/sd-agent info 

or

/usr/share/python/sd-agent/agent.py info

If the agent has been configured correctly you'll see an output such as:

solr
-----
  - instance #0 [OK]
  - Collected * metrics

You can also view the metrics returned with the following command:

service sd-agent jmx collect

Configuring graphs

Click the name of your server from the Devices list in your Server Density account then go to the Metrics tab. Click the + Graph button on the right then choose the solr metrics to display the graphs. The metrics will also be available to select when building dashboard graphs.

Screen_Shot_2018-01-18_at_11.46.12.png

Monitored metrics

MetricValues
solr.cache.evictions

The total number of cache evictions per second.
eviction / second
Type: float
solr.cache.hits

The number of cache hits per second.
hit / second
Type: float
solr.cache.inserts

The total number of cache inserts per second.
set / second
Type: float
solr.cache.lookups

The total number of cache lookups per second.
get / second
Type: float
solr.search_handler.avg_requests_per_sec

The average number of requests per second.
request / second
Type: float
solr.search_handler.avg_time_per_req

The average time per request.
millisecond / request
Type: float
solr.search_handler.errors

Number of errors per second encountered by the handler.
error / second
Type: float
solr.search_handler.requests

Number of requests per second processed by the handler.
request / second
Type: float
solr.search_handler.time

The sum of all request processing times (in milliseconds) per second.
None / None
Type: float
solr.search_handler.timeouts

Number of responses per second received with partial results.
timeout / second
Type: float
solr.searcher.maxdoc

One greater than the largest possible document number.
document / None
Type: float
solr.searcher.numdocs

The total number of indexed documents.
document / None
Type: float
solr.searcher.warmup

The time spent warming up.
millisecond / None
Type: float
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Monday  —  Friday.

10am  —  6pm UK.

Dedicated Support.