调用DescribeClusterOperationHostTaskLog接口,获取集群操作历史中,指定主机上的指定task的执行日志详情。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeClusterOperationHostTaskLog

系统规定参数。取值:DescribeClusterOperationHostTaskLog。

ClusterId String C-F32FB31D82954C64

集群ID。您可以调用ListClusters查看集群的ID。

OperationId String 11123

操作历史的ID。可从ListClusterOperation接口的返回值中获取。

TaskId String 1098803

待查询的Task的ID信息,可从ListClusterOperationHostTask接口的返回中获取。

RegionId String cn-hangzhou

地域ID。您可以调用DescribeRegions查看最新的阿里云地域列表。

HostId String 41008

待查询日志的主机ID。可从ListClusterOperationHost接口的返回值中获取。

Status String SUCCESS

Task的状态信息。

返回数据

名称 类型 示例值 描述
RequestId String 4CD0BBA0-AC8A-4239-A219-953472BEB4F6

请求对应的唯一ID标识。

Stderr String 2018-11-27 14:21:59========================================================================================================== Tue, 27 Nov 2018 14:21:59 IlogtaildComponentOperator.py[line:140] INFO ilogtail has been started, return

任务的stderr 日志信息。

Stdout String 2018-11-27 14:21:59========================================================================================================== touch -c /var/lib/ecm-agent/cache/ecm/service/ILOGTAIL/1.0.0.0.1-df/package/scripts/IlogtaildComponentOperator.py touch -c /var/lib/ecm-agent/cache/ecm/service/ILOGTAIL/1.0.0.0.1-df/package/scripts/IlogtaildConfigService.py root 2844 0.0 0.0 49244 2380 ? Ss 14:20 0:00 /usr/local/ilogtail/ilogtail root 2846 0.5 0.2 231416 18352 ? Sl 14:20 0:00 /usr/local/ilogtail/ilogtail Command completed successfully!

任务的 stdout 日志信息。

示例

请求示例

http(s)://[Endpoint]/?Action=DescribeClusterOperationHostTaskLog
&ClusterId=C-F32FB31D82954C64
&HostId=41008
&OperationId=11123
&TaskId=1098803
&RegionId=cn-hangzhou
&<公共请求参数>

正常返回示例

XML 格式

<requestId>xxx</requestId>
<stderr>2018-11-27 14:21:59========================================================================================================== Tue, 27 Nov 2018 14:21:59 IlogtaildComponentOperator.py[line:140] INFO ilogtail has been started, return</stderr>
<stdout>2018-11-27 14:21:59========================================================================================================== touch -c /var/lib/ecm-agent/cache/ecm/service/ILOGTAIL/1.0.0.0.1-df/package/scripts/IlogtaildComponentOperator.py touch -c /var/lib/ecm-agent/cache/ecm/service/ILOGTAIL/1.0.0.0.1-df/package/scripts/IlogtaildConfigService.py root 2844 0.0 0.0 49244 2380 ? Ss 14:20 0:00 /usr/local/ilogtail/ilogtail root 2846 0.5 0.2 231416 18352 ? Sl 14:20 0:00 /usr/local/ilogtail/ilogtail   Command completed successfully!</stdout>

JSON 格式

{"requestId":"xxx",
"stderr":"2018-11-27 14:21:59========================================================================================================== Tue, 27 Nov 2018 14:21:59 IlogtaildComponentOperator.py[line:140] INFO ilogtail has been started, return",
"stdout":"2018-11-27 14:21:59========================================================================================================== touch -c /var/lib/ecm-agent/cache/ecm/service/ILOGTAIL/1.0.0.0.1-df/package/scripts/IlogtaildComponentOperator.py touch -c /var/lib/ecm-agent/cache/ecm/service/ILOGTAIL/1.0.0.0.1-df/package/scripts/IlogtaildConfigService.py root 2844 0.0 0.0 49244 2380 ? Ss 14:20 0:00 /usr/local/ilogtail/ilogtail root 2846 0.5 0.2 231416 18352 ? Sl 14:20 0:00 /usr/local/ilogtail/ilogtail   Command completed successfully!"}