check-running.asciidoc 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. ==== Check that Elasticsearch is running
  2. You can test that your {es} node is running by sending an HTTPS request to port
  3. `9200` on `localhost`:
  4. ["source","sh",subs="attributes"]
  5. ----
  6. curl --cacert {es-conf}{slash}certs{slash}http_ca.crt -u elastic https://localhost:9200 <1>
  7. ----
  8. // NOTCONSOLE
  9. <1> Ensure that you use `https` in your call, or the request will fail.
  10. +
  11. `--cacert`::
  12. Path to the generated `http_ca.crt` certificate for the HTTP layer.
  13. Enter the password for the `elastic` user that was generated during
  14. installation, which should return a response like this:
  15. ////
  16. The following hidden request is required before the response. Otherwise, you'll
  17. get an error because there's a response with no request preceding it.
  18. [source,console]
  19. ----
  20. GET /
  21. ----
  22. ////
  23. ["source","js",subs="attributes,callouts"]
  24. --------------------------------------------
  25. {
  26. "name" : "Cp8oag6",
  27. "cluster_name" : "elasticsearch",
  28. "cluster_uuid" : "AT69_T_DTp-1qgIJlatQqA",
  29. "version" : {
  30. "number" : "{version_qualified}",
  31. "build_type" : "{build_type}",
  32. "build_hash" : "f27399d",
  33. "build_date" : "2016-03-30T09:51:41.449Z",
  34. "build_snapshot" : false,
  35. "lucene_version" : "{lucene_version}",
  36. "minimum_wire_compatibility_version" : "1.2.3",
  37. "minimum_index_compatibility_version" : "1.2.3"
  38. },
  39. "tagline" : "You Know, for Search"
  40. }
  41. --------------------------------------------
  42. // TESTRESPONSE[s/"name" : "Cp8oag6",/"name" : "$body.name",/]
  43. // TESTRESPONSE[s/"cluster_name" : "elasticsearch",/"cluster_name" : "$body.cluster_name",/]
  44. // TESTRESPONSE[s/"cluster_uuid" : "AT69_T_DTp-1qgIJlatQqA",/"cluster_uuid" : "$body.cluster_uuid",/]
  45. // TESTRESPONSE[s/"build_hash" : "f27399d",/"build_hash" : "$body.version.build_hash",/]
  46. // TESTRESPONSE[s/"build_date" : "2016-03-30T09:51:41.449Z",/"build_date" : $body.version.build_date,/]
  47. // TESTRESPONSE[s/"build_snapshot" : false,/"build_snapshot" : $body.version.build_snapshot,/]
  48. // TESTRESPONSE[s/"minimum_wire_compatibility_version" : "1.2.3"/"minimum_wire_compatibility_version" : $body.version.minimum_wire_compatibility_version/]
  49. // TESTRESPONSE[s/"minimum_index_compatibility_version" : "1.2.3"/"minimum_index_compatibility_version" : $body.version.minimum_index_compatibility_version/]
  50. // So much s/// but at least we test that the layout is close to matching....