监控与采集相关接口/指标采集
PUTMonitoring起始版本 1.0同步需要认证
更新采集目标
更新端点标签采集间隔已存在采集目标。
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
路径参数
请求参数
路径参数
uuidString必填资源的UUID,唯一标识该资源。
请求体字段
nameString必填资源名称。
示例: node-exporter-host01-updated
endpointString必填接收端地址。
示例: http://192.168.1.10:9100
metricsPathString必填指标抓取路径。
示例: /metrics
scrapeIntervalInteger必填抓取周期。
示例: 30
labelsLinkedHashMap必填标签列表。
示例: (nested object)
响应状态
请求地址
PUT/api/v1/monitoring/scrape-targets/{uuid}
/api/v1/monitoring/scrape-targets/{uuid}
请求示例
curl -X PUT '{host}/api/v1/monitoring/scrape-targets/{uuid}' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"name":"node-exporter-host01-updated","endpoint":"http://192.168.1.10:9100","metricsPath":"/metrics","scrapeInterval":30,"labels":"(nested object)","enabled":true,"tenantUuid":"tenant-001-xyz"}'
响应示例
200{
"uuid": "target-001-abc",
"name": "node-exporter-host01",
"endpoint": "http://192.168.1.10:9100",
"metricsPath": "/metrics",
"scrapeInterval": 15,
"labels": null,
"enabled": true,
"tenantUuid": "tenant-001-xyz"
}变更历史
此 API 暂无变更历史记录。
