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

调试

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

请求参数

名称 类型 是否必选 示例值 描述
ClusterId String C-F32FB31D82954C64

集群ID。

HostId String 41008

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

OperationId String 11123

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

Action String DescribeClusterOperationHostTaskLog

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

TaskId String 1098803

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

RegionId String cn-hangzhou

地域ID。

Status String SUCCESS

Task的状态信息。

AccessKeyId String LTAI8ljWyu7y****

阿里云AccessKey ID信息,用于标识访问者身份。

返回数据

名称 类型 示例值 描述
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 格式

<DescribeClusterOperationHostTaskLogResponse>
	  <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>
</DescribeClusterOperationHostTaskLogResponse>

JSON 格式

{
	"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!",
	"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"
}

错误码

HttpCode 错误码 错误信息 描述
403 Params.Illegal The specified parameters are wrongly formed.. 指定参数格式错误
403 User.OtherUserResource.NotAllow It is not allowed to operate other user's resource 不能操作其它用户的资源
403 Invalid.Cluster.Status Invalid cluster status %s in status list 指定集群状态不合法
403 Invalid.Cluster.Type Invalid cluster type %s in cluster type list 指定集群类型不合法
500 InternalError The request processing has failed due to some unknown error. 内部错误,请提工单

访问错误中心查看更多错误码。