You can call this operation to view the logs of specified tasks that are executed on a specified host.

Request parameters

Name Type Required Example Description
ClusterId String Yes C-0E995C0EE7E5ECB3 The ID of the cluster.
HostId String Yes 41008 The ID of the host that stores the logs to query. You can obtain the host ID by calling the ListClusterOperationHost operation.
OperationId String Yes 11123 The operation ID. You can obtain the value by calling the ListClusterOperation operation.
TaskId String Yes 1098803 The task ID. You can obtain the value by calling the ListClusterOperationHostTask operation.
Status String No SUCCESS The status of the task. Not required.
RegionId String Yes cn-hangzhou The region location ID.
AccessKeyId String No xxx The AccessKey ID.

Response parameters

Name Type Example Description
RequestId String A544317F-4A60-4532-AC96-191B9D80420AF The ID of the request.
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! The stdout log of the task.
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 The stderr log of the task.

Examples

  • Sample requests
    /? ClusterId=C-F32FB31D82954C64
    &HostId=41008
    &OperationId=11123 
    &RegionId=cn-hangzhou 
    &TaskId=1098803
    &AccessKeyId=xxx
    &Status=SUCCESS
    &<Common request parameters>
  • Successful response examples
    JSON format
    {
    	"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!"
    }
  • Error response examples
    JSON format
    {
    	"code":"RAM.Permission.NotAllow",
    	"message":"It is not allow to execute this operation,please use RAM to authorize!",
    	"requestId":"9AEDC439-1F63-491D-B8C6-9737C372BF3A",
    	"successResponse":false
    }

Error codes

View error codes.