如何获得像生活方式事件一样的mttt ping数据? AWS IOT仪表板将消息作为类型报告。与Connect,Ping,Publish,Subscribe类似。我想通过clientid了解每个ping延迟
我可以通过创建类似于
的IOT规则来获取生命周期事件http://docs.aws.amazon.com/iot/latest/developerguide/topics.html
SELECT *, topic() as Topic, clientid() as ClientID, accountid() as AccountID, principal() as Principal, traceid() as TraceID FROM '$aws/events/#'
{
"clientId": "mqtt-explorer-48606",
"timestamp": 1501188384737,
"eventType": "disconnected",
"clientInitiatedDisconnect": false,
"sessionIdentifier": "da3dd0f6-1c45-4dd-ae2d-ac0b01dd98c",
"principalIdentifier": "26dd6172d/AROd7C:CognitontityCredentials/ARdCOdVWSKdU7LdC:CognitoIdentityCredentials",
"Topic": "$aws/events/presence/disconnected/mqtt-explorer-48606",
"ClientID": "N/A",
"AccountID": "269986",
"Principal": "26dd6172d/AROd7C:CognitoIdentityCredentials/AROAJCO5QQVWSKLHU7L7C:CognitoIdentityCredentials",
"TraceID": "380c8dfc-cc79-9c58-7e27-61566788"
}