The Solr Ping request handler is an endpoint for load balancers or service warning systems can use to check the "up" status of a Solr server or container.


Configure the request handler by adding the PingRequestHandler class to bottom of solrconfig.xml

<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
	<lst name="invariants">
		<!-- specify the handler to delegate to -->
		<str name="qt">/search</str>
        <str name="q">some test query</str>
	<lst name="defaults">
		<str name="echoParams">all</str>
		<str name="df">article</str>
	<!-- relative paths are resolved against the data dir -->
	<str name="healthcheckFile">server-enabled.txt</str>

These specify the handler.

These ensure a request should be executed.

If this file does not exist, the handler will throw an HTTP error even though the server is working fine and the query would have succeeded. See one way to create it below.


On the Core Selector page of the Solr Admin UI, the Ping option will display the length of time a request took in milliseconds. If it shows a message like "Ping request handler is not configured with a healthcheck file," then generate the Healthcheck file automatically by appending the string admin/ping?action=enable to the end of the collection shard's URL (or shard replica) in another browser tab and hitting enter, for example:


This should return "QTime=0", and the Ping Healthcheck section on the Solr Admin UI Core Selector page will now a green checkmark in the Healthcheck Status section.


This shows how any external system, or the PingRequestHandler itself, can be used to create/delete the health check file by specifying an “action” param in a request:

  • http://host:port/solr/admin/ping?action=enable – creates the health check file if it does not already exist.
  • http://host:port/solr/admin/ping?action=disable – deletes the health check file if it exists.
  • http://host:port/solr/admin/ping?action=status – returns a status code indicating if the healthcheck file exists (“enabled”) or not (“disabled”).

Configure Client

The Ping handler returns a simple "OK" or HTTP Error code response to requests. To monitor server status, configure requests that poll the PingRequestHandler and monitor the responses.

Load balancers can use the healthcheck file to determine whether the server should be “removed from rotation” for maintenance or upgrades.


Example blog post that could be better -

Implicit RequestHandlers -

Server Health Tests -

Request Parameters API -