UpdateAggTaskGroup
Applies an aggregation task group.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:UpdateAggTaskGroup |
update |
*AggTaskGroup
|
None | None |
Request syntax
PUT /prometheus-instances/{instanceId}/agg-task-groups/{groupId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
Yes |
The Prometheus instance ID of the aggregation node group. Aggregation nodes read data from this instance. |
rw-pq4apob9jm |
| groupId |
string |
Yes |
The ID of the aggregation task group. |
aggTaskGroup-xxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request struct. |
|
| aggTaskGroupConfig |
string |
Yes |
The configuration of the aggregation task group. Only the RecordingRuleYaml format is supported. The configuration must meet the format requirements of RecordingRule in open-source Prometheus. |
groups: - name: "node.rules" interval: "60s" rules: - record: "node_namespace_pod:kube_pod_info:" expr: "max(label_replace(kube_pod_info{job=\"kubernetes-pods-kube-state-metrics\"\ }, \"pod\", \"$1\", \"pod\", \"(.*)\")) by (node, namespace, pod, cluster)" |
| aggTaskGroupConfigType |
string |
No |
The configuration type of the aggregation task group. Default value: RecordingRuleYaml, which is the RecordingRule format of open-source Prometheus. |
RecordingRuleYaml |
| aggTaskGroupName |
string |
No |
The name of the aggregation task group. |
test-group |
| cronExpr |
string |
No |
The cron expression used when the scheduling mode is set to Cron. For example, 0/1 * * * * indicates that the task is scheduled every 1 minute starting from minute 0. |
0/1 * * * * |
| delay |
integer |
No |
The fixed delay time for scheduling, in seconds. Default value: 30. |
30 |
| description |
string |
No |
The description of the aggregation task group. |
desc |
| fromTime |
integer |
No |
The timestamp of the scheduling start time, in seconds. |
1724996015 |
| maxRetries |
integer |
No |
The maximum number of retries for executing the aggregation task. Default value: 20. |
20 |
| maxRunTimeInSeconds |
integer |
No |
The maximum retry time to execute the aggregation node, in seconds. Default value: 600. |
600 |
| precheckString |
string |
No |
The precheck configuration. By default, this parameter is not configured. The input string must be a valid JSON string. |
{"policy":"skip","prometheusId":"xxx","query":"scalar(sum(count_over_time(up{job=\"_arms/kubelet/cadvisor\"}[15s])) / 21)","threshold":0.5,"timeout":15,"type":"promql"} |
| scheduleMode |
string |
No |
The scheduling mode. Valid values: Cron and FixedRate. Default value: FixedRate. Valid values:
|
FixedRate |
| scheduleTimeExpr |
string |
No |
The scheduling time expression. Use @s or @m to specify the alignment granularity of the scheduling time window. Default value: @m. |
@m |
| status |
string |
No |
The status of the aggregation task group. Valid values: Running and Stopped. Default value: Running. Valid values:
|
Running |
| tags |
array<object> |
No |
The tags of the resource group. |
|
|
object |
No |
The tag. |
||
| key |
string |
No |
The key of the tag. |
key1 |
| value |
string |
No |
The value of the tag. |
value1 |
| targetPrometheusId |
string |
Yes |
The target Prometheus instance ID of the aggregation node group. |
rw-pq4apob9jm |
| toTime |
integer |
No |
The timestamp of the scheduling end time, in seconds. A value of 0 indicates that the scheduling does not stop. |
0 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response struct. |
||
| requestId |
string |
The request ID. |
8FDE2569-626B-5176-9844-28877A***** |
| aggTaskGroupConfigHash |
string |
The hash of the aggregation task group configuration. |
a54136014dc386a92c83a6ef1e97ff22 |
| aggTaskGroupId |
string |
The ID of the aggregation task group. |
aggTaskGroup-5fb2c3ade63a4709bcb059d13493b7b8 |
| aggTaskGroupName |
string |
The name of the aggregation task group. |
pipeline-aggtask-group |
| sourcePrometheusId |
string |
The ID of the source Prometheus instance for the aggregation task group. |
rw-083e17834e279f8c627fe91a2d72 |
| status |
string |
The current status of the aggregation task group. |
Running |
Examples
Success response
JSON format
{
"requestId": "8FDE2569-626B-5176-9844-28877A*****",
"aggTaskGroupConfigHash": "a54136014dc386a92c83a6ef1e97ff22",
"aggTaskGroupId": "aggTaskGroup-5fb2c3ade63a4709bcb059d13493b7b8",
"aggTaskGroupName": "pipeline-aggtask-group",
"sourcePrometheusId": "rw-083e17834e279f8c627fe91a2d72",
"status": "Running"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.