您可以使用 ListEvents 方法列出在集群上检测到的事件,按从旧到新的顺序排列。
此方法具有以下输入参数:
名称 | 说明 | 类型 | 默认值 | 必需 |
---|---|---|---|---|
driveID | 指定仅返回具有此驱动器 ID 的事件。 | 整型 | 0 | 否 |
endEventID | 标识要返回的事件 ID 范围的结尾。 | 整型 | (无限制) | 否 |
endPublishTime | 指定仅返回在当前时间之前发布的事件。 | 字符串 | 0 | 否 |
endReportTime | 指定仅返回在当前时间之前报告的事件。 | 字符串 | 0 | 否 |
eventType | 指定要返回的事件类型。请参见 event 了解可能的事件类型。 | 字符串 | 0 | 否 |
maxEvents | 指定返回的最大事件数量。 | 整型 | (无限制) | 否 |
nodeID | 指定仅返回具有此节点 ID 的事件。 | 整型 | ||
serviceID | 指定仅返回具有此服务 ID 的事件。 | |||
startEventID | 标识要返回的事件范围的开头。 | 整型 | 0 | 否 |
startPublishTime | 指定仅返回在当前时间之后发布的事件。 | 字符串 | 0 | 否 |
startReportTime | 指定仅返回在当前时间之后报告的事件。 | 字符串 | 0 | 否 |
此方法的请求类似于以下示例:
{ "method": "ListEvents", "params": { }, "id" : 1 }
此方法返回类似于以下示例的响应:
{ "id":1, "result":{ "events":[ { "details": { "paramGCGeneration":1431550800, "paramServiceID":2 }, "driveID":0, "eventID":2131, "eventInfoType":"gcEvent", "message":"GC Cluster Coordination Complete", "nodeID":0, "serviceID":2, "severity":0, "timeOfPublish":"2015-05-13T21:00:02.361354Z", "timeOfReport":"2015-05-13T21:00:02.361269Z" },{ "details": { "eligibleBS":[5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,24,25,26,27,28,29,30,31,40,41,42,43,44,45,46,47,52,53,54,55,56,57,58,59,60], "generation":1431550800, "participatingSS":[23,35,39,51] }, "driveID":0, "eventID":2130, "eventInfoType":"gcEvent", "message":"GCStarted", "nodeID":0, "serviceID":2, "severity":0, "timeOfPublish":"2015-05-13T21:00:02.354128Z", "timeOfReport":"2015-05-13T21:00:02.353894Z" },{ "details":"", "driveID":0, "eventID":2129, "eventInfoType":"tSEvent", "message":"return code:2 t:41286 tt:41286 qcc:1 qd:1 qc:1 vrc:1 tt:2 ct:Write etl:524288", "nodeID":0, "serviceID":0, "severity":0, "timeOfPublish":"2015-05-13T20:45:21.586483Z", "timeOfReport":"2015-05-13T20:45:21.586311Z" } ] } }