tencent cloud

Feedback

Creating API Monitoring Task

Last updated: 2024-07-05 11:40:06
    This document describes how to create a API monitoring task to test the API response performance and availability over the GET/POST protocol or port, so as to ensure the user experience and business availability.

    Directions

    1. Log in to the CAT console.
    2. On the left sidebar, click Tasks.
    3. Click Create task at the top of the Tasks page.
    4. Configure the basic information as follows:
    Configuration Item
    Description
    Test mode
    Select Regular test.
    Task type
    Select API monitoring.
    Protocol type
    Supports HTTP(s), SSL, TCP, and UDP protocols.
    Task name
    Enter a custom test task name.
    Testing address
    Enter the target web application address (starting with http://)
    For example:
    Domain name: http://www.tencent.com
    Domain name port: http://www.tencent.com:80
    Note: You need to select the request type for HTTP(s), such as GET, POST, etc.
    Test frequency
    It can be 1 minute, 5 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour, 2 hours, or 4 hours. For example, if you select 5 minutes, each test node will be tested once every five minutes.
    Scheduled
    The task is performed every day by default. You can also customize an execution plan as needed. For example, you can set to execute a test task between 8:00 AM and 9:00 AM on any specified day of the week.
    Task tag
    CAT can be used with the Tencent Cloud resource tag feature to perform tag-based sub-account authorization and cost allocation.
    5. Configure the testing node as follows: i. Select the method: You can select Recommended testing node group or Custom testing node group (the former contains common nodes). ii. Select the testing node:
    Availability testing nodes: Only network quality and API monitoring tasks are supported. This option is suitable for network quality monitoring, API availability monitoring, and hijacking and blocking detection.
    Scenario-based testing nodes: This option is suitable for page user experience and streaming lag monitoring, availability testing under poor network conditions, CDN selection, and path optimization. It covers global IDC, PC, and mobile testing nodes.
    Recommended testing node group: Commonly used and recommended testing nodes.
    Custom testing node group: Select the region, node type, and testing node on the right box. Node types are as detailed below:
    Testing node Type
    Description
    PC
    IDC
    It is the testing node deployed on the PC to test the PC user experience.
    LastMile
    It is the testing node deployed on the end user's PC to test the end user's experience on the PC.
    Mobile
    It is the location deployed on the mobile phone to test the mobile user experience.
    Testing node groups: You can select a common testing node group in Scenario-based testing nodes and click Create group in the bottom-right corner. Then, you can directly select a common testing node you created from Testing node groups when creating a task.
    
    
    
    Suggestions for selection
    IDC and LastMile have different network environments, and the former is more stable than the latter.
    To test the business availability, you can select the more stable IDC.
    To check the access experience and network conditions of end users, we recommend you select LastMile or Mobile to simulate the user access to an application.
    6. Configure the test parameters (optional). By default, the system configures common test parameters. You can also customize test rules as follows: HTTP(s):
    Configuration Item
    Description
    Default Value
    Result with private IP ignored
    If the DNS resolution result is a private IP address (reserved address such as 127.0.0.1, 0.0.0.0), it will be considered a test failure. If this situation is not ignored, the test result will not be displayed, and no alarms or test fees will be generated.
    -
    Custom host
    The custom host is the explanation method of the domain name when used to specify a test, for interpreting the domain name as a fixed IP (it can also be another domain name, similar to CNAME).
    Supports polling or random monitoring by IP address. Please use a half-width comma separator for multiple IPs.
    For example:
    IPv4: 192.168.2.1,192.168.2.5:img.a.com|192.168.2.1?]:img.a.com|
    IPv6: [0:0:0:0:0:0:0:1][8080],[0:0:0:0:0:0:0:2][8081]:www.a.com|]
    -
    Request configuration
    Customize the Header, Authentication, Query parameters, and Cookies to be added to an HTTP request.
    -
    Verification method
    Customize the method to verify API data requests, which can be statusCode, body, or header.
    -
    Other configuration items of SSL, TCP, and UDP:
    Configuration Item
    Description
    Default Value
    Request type
    You can enter the request content, i.e., the request header information of the protocol, in plain text or binary streams.
    -
    Request content
    Customize the request content for a API monitoring test.
    -
    Verification method
    Customize the method to verify API data requests.
    No verification: Data integrity is not verified.
    Full match: The response data must be exactly the same as the entered data.
    Partial match: The response data need to contain part of or all the entered data, and the received data must be greater than the entered data in size.
    MD5: The response data is saved as a file for MD5 checksum calculation, and the obtained value needs to be exactly the same as the expected value.
    
    No verification
    
    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