Connecting to an Instance Using a Load Balancer Address (Recommended)
Scenarios
This section uses the Linux operating system as an example to describe how to connect an ECS to a GeminiDB Influx instance using a load balancer IP address.
Precautions
- The DB instances must be in the same VPC and subnet as the ECS.
- The ECS must be allowed by the security group to access DB instances.
- If the instance is associated with the default security group, you do not need to configure security group rules.
- If the instance is not associated with the default security group, check whether the security group rules allow the ECS to access the instance. For details, see Configuring Security Group Rules.
Prerequisites
- An ECS has been created. The following uses a Linux ECS as an example. For details, see Purchasing an ECS in Getting Started with Elastic Cloud Server.
- You have downloaded and installed the InfluxDB client on a Linux 64-bit ECS.
SSL Connection
- Log in to the ECS. For details, see Logging In to an ECS in Getting Started with Elastic Cloud Server.
- Upload the InfluxDB client installation package to the ECS using file transfer tools like XFTP.
- Decompress the client tool package.
tar -xzf influxdb-1.7.9-static_linux_amd64.tar.gz
- Connect to the DB instance in the directory where the influx tool is located.
- Run the following command to go to the InfluxDB directory:
- Connect to a GeminiDB Influx instance.
./influx -ssl -unsafeSsl -username '<DB_USER>' -password '<DB_PWD>' -host <DB_HOST> -port <DB_PORT>
Example:
./influx -ssl -unsafeSsl -username 'rwuser' -password '<DB_PWD>' -host 192.xx.xx.xx -port 8635
Table 1 Description Parameter
Description
<DB_USER>
Username of the administrator account. The default value is rwuser.
On the Instances page, click the target DB instance. In the DB Information area on the Basic Information page, you can find the administrator username.
<DB_PWD>
Administrator password
<DB_HOST>
Load balancer IP address of the instance to be connected.
The load balancer IP address is in the open beta test (OBT) phase. To use it, contact customer service.
Scenario 1:
If you have enabled the load balancer address before creating an instance, you can view that the load balancer address is selected by default on the instance creation page.
After the instance is created, click the instance name to go to the Basic Information page and obtain the load balancer address in the Network Information area.
Scenario 2:
If you have already created an instance, you can contact customer service to enable the load balancer IP address for the instance.
Then you can click the instance name to view the load balancer address in the Network Information area on the Basic Information page.
<DB_PORT>
Port for accessing the instance.
You can click the name of the instance to go to the Basic Information page. In the Network Information area, view the port number.
- Check the results. If information similar to the following is displayed, the connection is successful.
Connected to https://host:port version 1.7.4 InfluxDB shell version: 1.7.9 >
Non-SSL Connection
- Log in to the ECS. For details, see Logging In to an ECS in Getting Started with Elastic Cloud Server.
- Upload the InfluxDB client installation package to the ECS using file transfer tools like XFTP.
- Decompress the client tool package.
tar -xzf influxdb-1.7.9-static_linux_amd64.tar.gz
- Connect to the DB instance in the directory where the influx tool is located.
- Run the following command to go to the InfluxDB directory:
- Connect to a GeminiDB Influx instance.
./influx -username '<DB_USER>' -password '<DB_PWD>' -host <DB_HOST> -port <DB_PORT>
Example:
./influx -username 'rwuser' -password '<DB_PWD>' -host 192.xx.xx.xx -port 8635
- Check the results. If information similar to the following is displayed, the connection is successful.
Connected to https://host:port version 1.7.4 InfluxDB shell version: 1.7.9 >
Follow-up Operations
After you log in to the instance, you can create databases or data retention policies. For details, see Buying and Connecting to a GeminiDB Influx Instance.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot