Skip to main content

Connect to an OpenSearch cluster

To connect to an OpenSearch cluster, connect to nodes in a group with the Manager, Data, or Dashboard role. Choosing a node for connection depends on the purpose of your connection — for example, if you need access to the cluster dashboard, you should connect to a node from the group with the Dashboard role. For more information about node groups and their roles, see the Node Groups instruction.

You can:

TLS(SSL) encryption is supported only when connecting via a private IP address.

When connecting, specify the port and address.

Connection ports

Use port 9200 to connect to cluster nodes.

Connection addresses

You can choose an address for connection depending on one of the scenarios:

You can view the connection address in the Control Panel.

Connecting to a cluster from a private subnet

If you are connecting to a cluster from a private subnet, use a private IP address.

To connect from another private subnet, first connect both private subnets to a cloud router.

Connecting to a cluster from the internet

If you are connecting to the cluster from the Internet, use a public IP address. The private subnet must meet the requirements. If the subnet does not meet the requirements, prepare it for a public IP address connection.

View connection address

  1. In the Control Panel, click Products in the top menu and select Managed Databases.
  2. Open the Active tab.
  3. Open the database cluster page → Connection tab.
  4. In the Connection addresses block, open the tab for the node group whose addresses you want to view.

Connect to nodes of a group with the Manager and Data roles

You can connect to nodes of groups with the Manager and Data roles using SSL only via a private IP address. Connecting using TLS(SSL) encryption ensures a secure connection between your server and the database cluster.

  1. Download the root certificate and place it in the ~/.opensearch/:

    mkdir -p ~/.opensearch/
    wget https://storage.dbaas.selcloud.ru/CA.pem -O ~/.opensearch/root.crt
    chmod 0600 ~/.opensearch/root.crt
  2. Connect to the node:

    curl -XGET -u 'admin:<password>' --cacert ~/.opensearch/root.crt 'https://<ip_address>:<port>/'

    Specify:

    • <password> — administrator password; ;
    • <ip_address> — node IP address; ;
    • <port>connection port.

Connect to a group node with the Dashboard role

You can connect to a group node with the Dashboard role through the OpenSearch Dashboards web interface.

  1. Open the following page in your browser:

    https://<ip_address>

    Specify <ip_address> — IP address of a node in the group with the Dashboard role.

  2. Enter the login — admin.

  3. Enter the password — it is specified during cluster creation. Once created, the password cannot be viewed in the Control Panel, but it can be changed.

  4. To verify the connection, run a test query in the Dev Tools console — for example, check the cluster status:

    GET _cluster/health

    The response will contain information about the cluster status.