Just issue a HTTP HEAD request against port 9200 of the host you want to
connect to and check for status 200
curl -I -XHEAD localhost:9200
HTTP/1.1 200 OK
Content-Type: text/plain; charset=UTF-8
Content-Length: 0
Or, if you want version information, use a HTTP GET request
curl -XGET localhost:9200
{
"status" : 200,
"name" : "Human Fly",
"version" : {
"number" : "1.1.0",
"build_hash" : "2181e113dea80b4a9e31e58e9686658a2d46e363",
"build_timestamp" : "2014-03-25T15:59:51Z",
"build_snapshot" : false,
"lucene_version" : "4.7"
},
"tagline" : "You Know, for Search"
}
Jörg
On Wed, Apr 23, 2014 at 5:47 PM, Stefan Kruse
<[email protected]>wrote:
> Hi, does the PHP API Version a PING Function has included? I know the PING
> Function from Solar, its to check if the server is available and if not you
> can make a Fallback. Or how is the best way to check if the elasticsearch
> server is reachable? Regards and thanks Stefan.
>
> --
> You received this message because you are subscribed to the Google Groups
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/34326dc6-55bf-482e-8e64-f5a78f0590b1%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/34326dc6-55bf-482e-8e64-f5a78f0590b1%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEoJkA%2B4ris9RpBdCDO4OQdK-28HpxEK%2Bu--y6724237w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.