tencent cloud

Feedback

Deleting Metric Field

Last updated: 2023-03-02 14:35:20

    Request address

    The address is the instance IP and port, such as 10.13.20.15:9200, which can be obtained in the console.

    Request path and method

    Path: /_metric/${metric_name}/delete, where ${metric_name} is the metric name. Method: PUT

    Request parameters

    None

    Request content

    Parameter
    Required
    Type
    Description
    tags
    No
    Array
    Enumeration of the tag fields to be deleted, such as "tags": ["ip"].
    fields
    No
    Array
    Enumeration of the data fields to be deleted, such as "fields": ["diskUsage"].
    Notes
    As historical data cannot be modified, after fields are deleted, the metric information will not change until the next child metric is generated. If you want to check whether the deletion is successful, you can call the GET /_metric/${metric_name}?v API. For more information about child metric, see Creating Metric.

    Response

    You can check whether a request is successful based on the error field. If the response content contains the error field, the request failed. For the error details, see the error field description.

    Sample code for curl

    Request:
    curl -u root:le201909 -H 'Content-Type:application/json' -X PUT 172.xx.xx.4:9201/_metric/ctsdb_test1/delete -d'
    {
    "tags": ["ip"],
    "fields": ["cpu"]
    }'
    Response:
    {
    "acknowledged": true,
    "message": "update ctsdb_test1 metric success!"
    }
    
    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