Connecting to a GeminiDB Influx Instance Using the InfluxDB CLI over a Private Network
Scenarios
This section uses Linux as an example to describe how to connect to a GeminiDB Influx instance using a load balancer address or the private IP address of an ECS.
Usage Notes
- The instance and ECS must be in the same VPC and subnet.
- The ECS must be allowed by the security group to access the instance.
- If the instance is associated with the default security group, you do not need to set 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 Setting Security Group Rules for a GeminiDB Influx Instance.
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.
- Download the x86 client or Arm client of InfluxDB. The following uses the Linux 64-bit client as an example.
- 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 (for example, x86 client) tool package.
tar -xzf influxdb-1.8.10_linux_amd64.tar.gz
- Connect to your instance in the directory where the InfluxDB client is located.
- Run the following command to go to the InfluxDB directory:
cd influxdb-1.8.10-1/usr/bin
- Connect to the 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 Parameters Parameter
Description
<DB_USER>
Username of the administrator account. The default value is rwuser.
On the Instances page, click the instance name. In the DB Information area on the Basic Information page, you can see the administrator username.
<DB_PWD>
Administrator password
<DB_HOST>
Load balancer address of the instance to be connected.
Connecting to an instance using a load balancer address is now in OBT. To use it, choose Service Tickets > Create Service Ticket in the upper right corner of the console and contact the customer service.
Scenario 1:
If you have obtained a load balancer address before creating an instance, the load balancer address is selected by default on the instance creation page.
After the instance is created, click its name to go to the Basic Information page and obtain the load balancer IP address in the Network Information area.
Scenario 2:
To use a load balancer address after the instance is created, choose Service Tickets > Create Service Ticket in the upper right corner of the console and contact the customer service.
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>
Instance port
Click the instance name to go to the Basic Information page. In the Network Information area, you can see the instance port.
- Run the following command to go to the InfluxDB directory:
- Check the results. If information similar to the following is displayed, the connection is successful.
Connected to https://host:port version x.x.x InfluxDB shell version 1.8.10 >
- 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 (for example, x86 client) tool package.
tar -xzf influxdb-1.8.10_linux_amd64.tar.gz
- Connect to your instance in the directory where the InfluxDB client is located.
- Run the following command to go to the InfluxDB directory:
cd influxdb-1.8.10-1/usr/bin
- Connect to the 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
Table 2 Parameters Parameter
Description
<DB_USER>
Username of the administrator account. The default value is rwuser.
On the Instances page, click the instance name. In the DB Information area on the Basic Information page, you can see the administrator username.
<DB_PWD>
Administrator password
<DB_HOST>
Load balancer address of the instance to be connected.
Connecting to an instance using a load balancer address is now in OBT. To use it, choose Service Tickets > Create Service Ticket in the upper right corner of the console and contact the customer service.
- 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.
- If you have already created an instance and enabled the load balancer address, you can click the instance name and view the address in the Network Information area on the Basic Information page.
<DB_PORT>
Instance port
Click the instance name to go to the Basic Information page. In the Network Information area, you can see the instance port.
- 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.
- Run the following command to go to the InfluxDB directory:
- Check the results. If information similar to the following is displayed, the connection is successful.
Connected to https://host:port version x.x.x InfluxDB shell version: 1.8.10 >
- 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 (for example, x86 client) tool package.
tar -xzf influxdb-1.8.10_linux_amd64.tar.gz
- Connect to your instance in the directory where the InfluxDB client is located.
- Run the following command to go to the InfluxDB directory:
cd influxdb-1.8.10-1/usr/bin
- Connect to the GeminiDB Influx instance.
- Use the default certificate.
./influx -ssl -unsafeSsl -host <DB_HOST> -port <DB_PORT>
Example:
./influx -ssl -unsafeSsl -host 192.xx.xx.xx -port 8635
Table 3 Parameters Parameter
Description
<DB_HOST>
Private IP address of a node to be connected
On the Instances page, click the target instance name. You can see the private IP address in the Private IP Address column in the Node Information area.
If the instance you purchased has multiple nodes, select the private IP address of any node.
<DB_PORT>
Port of an instance to be connected. The default port is 8635 and cannot be changed.
Click the GeminiDB Influx instance to go to the Basic Information page. In the Network Information area, you can see the port.
- Use the default certificate.
- Run the auth command to authenticate the user.
auth
Enter the username and password as prompted.
username:<DB_USER>
password:<DB_PWD>
Table 4 Parameters Parameter
Description
<DB_USER>
Username of the administrator account. The default value is rwuser.
On the Instances page, click the instance name. In the DB Information area on the Basic Information page, you can see the administrator username.
<DB_PWD>
Administrator password
- Run the following command to go to the InfluxDB directory:
- After the authentication is successful, run the show databases command.
show databases
If the following information is displayed, the connection is successful.
name: databases name ---- _internal
- 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 (for example, x86 client) tool package.
tar -xzf influxdb-1.8.10_linux_amd64.tar.gz
- Connect to your instance in the directory where the InfluxDB client is located.
- Run the following command to go to the InfluxDB directory:
cd influxdb-1.8.10-1/usr/bin
- Connect to the GeminiDB Influx instance.
./influx -host <DB_HOST> -port <DB_PORT>
Example:
./influx -host 192.xx.xx.xx -port 8635
Table 5 Parameters Parameter
Description
<DB_HOST>
Private IP address of a node to be connected
On the Instances page, click the target instance name. You can see the private IP address in the Private IP Address column in the Node Information area.
If the instance you purchased has multiple nodes, select the private IP address of any node.
<DB_PORT>
Port of an instance to be connected. The default port is 8635 and cannot be changed.
Click the GeminiDB Influx instance to go to the Basic Information page. In the Network Information area, you can see the port.
- Run the auth command to authenticate the user.
auth
Enter the username and password as prompted.
username:<DB_USER>
password:<DB_PWD>
Table 6 Parameters Parameter
Description
<DB_USER>
Username of the administrator account. The default value is rwuser.
On the Instances page, click the instance name. In the DB Information area on the Basic Information page, you can see the administrator username.
<DB_PWD>
Administrator password
- Run the following command to go to the InfluxDB directory:
- After the authentication is successful, run the show databases command.
show databases
If the following information is displayed, the connection is successful.
name: databases name ---- _internal
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