= Ping :page-shortname: ping :page-permalink: ping.html // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. Choosing Ping under a core name issues a `ping` request to check whether the core is up and responding to requests. .Ping Option in Core Dropdown image::images/ping/ping.png[image,width=171,height=195] The search executed by a Ping is configured with the <>. See <> for the paramset to use for the `/admin/ping` endpoint. The Ping option doesn't open a page, but the status of the request can be seen on the core overview page shown when clicking on a collection name. The length of time the request has taken is displayed next to the Ping option, in milliseconds. == API Examples While the UI screen makes it easy to see the ping response time, the underlying ping command can be more useful when executed by remote monitoring tools: *Input* [source,text] ---- http://localhost:8983/solr//admin/ping ---- This command will ping the core name for a response. *Input* [source,text] ---- http://localhost:8983/solr//admin/ping?distrib=true ---- This command will ping all replicas of the given collection name for a response *Sample Output* [source,xml] ---- 0 13 {!lucene}*:* false _text_ 10 all OK ---- Both API calls have the same output. A status=OK indicates that the nodes are responding. *SolrJ Example* [source,java] ---- SolrPing ping = new SolrPing(); ping.getParams().add("distrib", "true"); //To make it a distributed request against a collection rsp = ping.process(solrClient, collectionName); int status = rsp.getStatus(); ----