tencent cloud

피드백

Syntax Rules

마지막 업데이트 시간:2024-09-20 17:48:27
    Metric topics use Prometheus’ PromQL syntax to query metric data. For detailed syntax, see the Prometheus official documentation. This document mainly describes some common syntax and directions to help you quickly understand the basic usage.
    There are two types of metric queries:
    Range queries: Also known as Prometheus Range queries. This method queries metric data at each time point within a specified time range based on the step. It is commonly used to observe trends in metric changes.
    Note:
    When the query step is less than the metric collection interval, the query results may contain duplicate data. For example, if the CPU utilization is reported every 15 seconds, and the query interval is set to 1 second, you will see 15 identical duplicate data.
    Instant queries: Also known as Prometheus Instant queries, this method returns the latest metric data within the query time range. It is commonly used to retrieve the current value of a metric.

    Common syntax

    1. Specifies the metric name to query the trend of metric values for each dimension under that metric name. For example, querying the disk capacity (disk_total):
    disk_total
    Search for the required CAM policy as needed, and click to complete policy association.
    
    
    
    2. Specifies the metric name and dimensions to query the trend of metric values for a specific dimension combination. For example, querying the disk capacity where the hostname is 6c74e00eb825 and the path is /etc/hostname:
    disk_total{host="6c74e00eb825", path="/etc/hostname"}
    Search for the required CAM policy as needed, and click to complete policy association.
    
    
    
    3. Aggregates metric data by specific dimensions. For example, querying the total disk capacity for each host and each device:
    sum by (host,device)(disk_total)
    Search for the required CAM policy as needed, and click to complete policy association.
    
    
    
    Note:
    For more PromQL syntax, see the Prometheus official documentation, or see the query examples.

    Directions

    1. Log in to the Cloud Log Service console.
    2. In the left navigation bar, select Search and Analysis, at the top, select the region where the metric topic is located, choose "Metric topic" as the subject type, and then select the required metric topic.
    3. Enter the query statement in the input box, then click the
    
    on the right to query metrics. You can also click Browse to query the names of existing metrics.
    문의하기

    고객의 업무에 전용 서비스를 제공해드립니다.

    기술 지원

    더 많은 도움이 필요하시면, 티켓을 통해 연락 바랍니다. 티켓 서비스는 연중무휴 24시간 제공됩니다.

    연중무휴 24시간 전화 지원