tencent cloud

DescribeJobMonitorData

Unduh
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-05-21 14:26:31

1. API Description

Domain name for API request: batch.intl.tencentcloudapi.com.

Query the resource usage monitoring information of Job task instances. This API only supports querying elastic node tasks and undeleted jobs. Computing environment tasks are not currently supported. This interface only supports querying the resource utilization of Job instances within a time range.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeJobMonitorData.
Version Yes String Common Params. The value used for this API: 2017-03-12.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
JobId Yes String Job ID; see JobId in the job list (https://www.tencentcloud.com/document/product/599/15909?from_cn_redirect=1).
TaskName Yes String Name of the job Task. See job details.
TaskInstanceIndex Yes Integer Serial number of the task instance. For details, see Task Detail.
MetricName Yes String Supported metrics; Metrics to be queried for the task currently supported.

-CpuUsage: cpu usage, unit: %
-MemUsage: Memory usage, measurement unit: %
-LanOuttraffic: Private network outbound bandwidth, measurement unit: Bytes/s
-LanIntraffic: Private network inbound bandwidth, unit: Bytes/s
-MaxDiskUsage: Highest disk utilization among all disks. Measurement unit: %
-TargetDiskUsage: Specify disk utilization, unit: %; use in conjunction with the Dimensions parameter.
StartTime No Timestamp ISO8601 Query start time of the task instance. If the query start time is not passed in or the incoming time is less than the instance creation time (see task detail (https://www.tencentcloud.com/document/product/599/15905?from_cn_redirect=1) for instance creation time), the query time will automatically be adjusted to the instance creation time. The passed-in time format supports only the zero time zone format.
EndTime No Timestamp ISO8601 Query the termination time of the task instance. If the query end time is not passed in or the passed-in time is larger than the termination time of the task instance (see task detail for the termination time of the task instance), and the task instance has already ended, the query end time will be automatically adjusted to the termination time of the task instance. If the task instance has not ended, the query end time will be automatically adjusted to the current time. The input time format supports only the zero time zone format.
Dimensions.N No Array of Dimension Query metrics extension parameter; currently only support TargetDiskUsage.

- TargetDiskUsage
-Supported query dimensions include diskname. The dimension value is the disk mount name, such as vdb. If this parameter is not provided, the default query is disk utilization of vdb.
Sample: [{"Name":"diskname", "Value":"vdb"}]

3. Output Parameters

Parameter Name Type Description
Period Integer Monitoring data granularity, measurement unit: second. Time granularity changes with the query time range. The smaller the query time range, the smaller the time granularity.
DataPoints DataPointView The collected data is monitored. Timestamps and corresponding values have a one-to-one relationship. If the querying task retries and the collection time period involves multiple instances, values during specific periods are null, indicating no instance existence at the corresponding time and no corresponding monitoring data. The maximum number of null values between adjacent monitoring time periods is 10.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Query Job Instance Resource Usage Monitoring Information

Input Example

POST / HTTP/1.1
Host: cvm.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeJobMonitorData
<Common request parameters>

{
    "JobId": "job-1jj9noyr",
    "TaskName": "demo-1",
    "TaskInstanceIndex": 0,
    "MetricName": "CpuUsage"
}

Output Example

{
    "Response": {
        "RequestId": "a66adf73-110f-49b4-a173-c68c952d4428",
        "Period": 60,
        "DataPoints": {
            "Timestamps": [
                1749696420,
                1749696430,
                1749696440
            ],
            "Values": [
                0.1,
                0.2,
                0.3
            ]
        }
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

There is no error code related to the API business logic. For other error codes, please see Common Error Codes.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan