Before you use an Alibaba Cloud Elasticsearch cluster to query your business data, make sure that you can access the cluster. You can access your Elasticsearch cluster by using the Kibana console, a curl command, or a client.

Use the Kibana console to access a cluster

The Kibana console is a part of the Elastic ecosystem and is seamlessly integrated into Elasticsearch. The Kibana console allows you to monitor the status of your Elasticsearch clusters and manage these clusters. This section describes how to use the Kibana console to manage your Elasticsearch cluster.

  1. Log on to the Alibaba Cloud Elasticsearch console.
  2. In the top navigation bar, select the region where your Alibaba Cloud Elasticsearch cluster resides.
  3. Find the target cluster and click its ID.
  4. In the left-side navigation pane of the page that appears, click Data Visualization.
  5. In the Kibana section, click Console.
  6. Enter the username and password and click Log in.
    Note
    • The username is elastic. The password is the one that is specified when you create your Elasticsearch cluster.
    • Before you log on to the Kibana console, make sure that the Public Network Access feature is enabled and the IP address of the host used to log on to the Kibana console is in the Kibana whitelist. By default, the Public Network Access feature is enabled. You can configure these settings in the Network Access Configuration section of the Kibana Configuration page.
  7. In the left-side navigation pane of the Kibana console, click Dev Tools. On the Console tab, run the following command to access your Elasticsearch cluster:
    GET /
    If the connection is established, the following result is returned:
    {
      "name" : "YnO5kEc",
      "cluster_name" : "es-cn-v641cjgnr000b****",
      "cluster_uuid" : "Xff3sz-GQQaLAqdOzJ****",
      "version" : {
        "number" : "6.7.0",
        "build_flavor" : "default",
        "build_type" : "tar",
        "build_hash" : "8453f77",
        "build_date" : "2019-03-21T15:32:29.844721Z",
        "build_snapshot" : false,
        "lucene_version" : "7.7.0",
        "minimum_wire_compatibility_version" : "5.6.0",
        "minimum_index_compatibility_version" : "5.0.0"
      },
      "tagline" : "You Know, for Search"
    }

Use a curl command to access a cluster

Before you use a curl command to access your Elasticsearch cluster, you must create an ECS instance that resides in the same region, zone, and Virtual Private Cloud (VPC) as the cluster. For more information, see Create an instance by using the provided wizard.
Notice You can also use an existing ECS instance. Make sure that this instance resides in the same region, zone, and VPC as your Elasticsearch cluster. For more information about how to use an ECS instance deployed in a classic network to access an Elasticsearch cluster deployed in a VPC, see Connect to Alibaba Cloud Elasticsearch from a classic network.
  1. Connect to an ECS instance.
    For more information, see Connect to an ECS instance.
  2. Run the following curl command to access your Elasticsearch cluster:
    Note If the system displays "curl command not found", run the yum install curl command to install curl on your ECS instance.
    curl -u <username>:<password> http://<host>:<port>
    Parameter Description
    <username> The account that is used to access your Elasticsearch cluster. We recommend that you use an account other than the elastic account.
    Notice
    • If you use the elastic account to access your Elasticsearch cluster and then reset the password of the account, it may require some time for the new password to take effect. During this period, you cannot use the elastic account to access your Elasticsearch cluster. Therefore, we recommend that you do not use the elastic account to access your Elasticsearch cluster.
    • If the version of your Elasticsearch cluster contains "with_X-Pack", you must specify both the username and password to access the cluster.
    <password> The password that is used to access your Elasticsearch cluster. The password is the one specified when you create the cluster or initialize Kibana.
    <host> The internal endpoint of your Elasticsearch cluster. You can obtain the internal endpoint from the Basic Information page of your cluster. For more information, see View basic information of a cluster.
    <port> The port of your Elasticsearch cluster. The default port is 9200. You can obtain the port number from the Basic Information page of the cluster. For more information, see View basic information of a cluster.
    Example command:
    curl -u elastic:es_password http://es-cn-vxxxxxxxxxxxxmedp.elasticsearch.aliyuncs.com:9200
    If the connection is established, the result shown in the following figure is returned.Successful response

Use a client to access a cluster

You can use a PHP, Python, Java, or Go client to access your Elasticsearch cluster. For more information, see Elasticsearch clients.