tencent cloud

Feedback

Configuring a Public Network Address for a Prometheus Instance

Last updated: 2024-11-22 18:12:53
    This document introduces how to configure a public network address for Prometheus monitoring.

    Practice Steps

    Step 1: Purchasing a Prometheus Instance

    1. Log in to TMP Console.
    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

    1. Go to the CLB Console and create a CLB instance.
    2. Fill in the information as prompted. For detailed instructions, see Creating a CLB Instance.
    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.
    
    
    
    For the operation guide, see CLB 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.
    
    
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support