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

  - 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


sudo systemctl restart sd-agent

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

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


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

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

  - 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.


Monitored metrics

Metric Values

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

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

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

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

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

The average time per request.
millisecond / request
Type: float

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

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

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

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

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

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

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


Monday  —  Friday.

10am  —  6pm UK.

Dedicated Support.