This document introduces how to configure a public network address for Prometheus monitoring.
Practice Steps
Step 1: Purchasing a Prometheus Instance
2. Click Create in the upper left corner to enter the Prometheus purchase page. You can purchase the corresponding instance based on your actual needs. For details, see Creating Instance. 3. After successfully purchasing, click the ID/Name of the created instance to enter the Basic Info of the instance details page to obtain the Prometheus IPV4 address.
Step 2: Applying for the Cross-VPC Access Feature of CLB (Beta Feature)
2. Fill in required information and submit the application.
3. You can use the cross-VPC access feature of CLB after the application is approved.
Step 3: Creating a CLB Instance for the Public Network
Note:
To bind the private IP address of a Prometheus instance, you need to create a CLB instance under the same VPC as this Prometheus instance. If a CLB instance already exists on the public network, no creation is required.
3. After creation, enter the basic information page of the instance and enable the cross-VPC access feature.
Step 4: Binding the Backend Service
1. Enter the Listener management page.
2. Click Create under the TCP/UDP/TCP SSL/QUIC listener.
3. After creating the listener, click the listener name. In the sub-window, click Bind to bind the backend service.
Target Type: Select IP Type.
Default Port: Enter 9090.
IP Address: Enter the IPv4 address of the Prometheus instance obtained in step 1.
4. Click Listener Name to check whether the listening is normal.
Step 5: Testing Whether the Configuration is Successful
1. Check the public network address of CLB. Assume that the address is 192.168.1.1.
2. Check the port configured for the listener, for example, port 8080.
Based on the above information, it is determined that the public network address for Prometheus forwarding is IP:PORT in the following new address, that is, 192.168.1.1:8080
.
3. Check in the browser or on the machine to see whether UP data can be obtained by using this IP address.
4. HTTP API address:
http://IP:PORT/api/v1/query?query=up
Replace IP:PORT with Public IP and Port of CLB as follows:
http://81.71.21.123:8080/api/v1/query?query=up
5. Access http://81.71.21.123:8080/api/v1/query?query=up
.
username: Enter your root account ID (app ID).
password: Obtain the token from the basic information page of the instance.
As shown below, the public network address is successfully configured for the Prometheus instance.
Was this page helpful?