Failure to monitor connection status of local client devices from IoT Core

1

I'm considering to monitor the connection status of all Greengrass core and client devices from the Fleet Hub. When interacting with local client devices, Fleet indexing never updates the connection state of the client device. I ran the sample Greengrass discovery application from the "Connect and test client devices" tutorial (https://docs.aws.amazon.com/greengrass/v2/developerguide/client-devices-tutorial.html). I was able to subscribe messages from client device by using MQTT test client, but connection status has been never updated. The connection state was updated when publishing directly to an IoT Core service endpoint from the client device. Can MQTT bridge component relay lifecycle events?

已提問 2 年前檢視次數 435 次
1 個回答
1
已接受的答案

Hi,

Today Fleet Hub and Fleet Indexing connectivity (FI) will only report for MQTT connections directly to AWS IoT Core. You should be able to see the Greengrass Core device connectivity status but will not be able to see the status of client devices that connect to the local MQTT broker. The reason for this is that FI uses the lifecycle events from IoT Core. There isn't a way for a Greengrass Core device to emit those events for client devices.

You could create a component that reads the Nucleus log file, greengrass.log, and parse client device connect/disconnect events. Fleet Hub will not be able to report on those from a connectivity perspective, but you could update a custom attribute or shadow field with device status and then create a Fleet Hub query.

To track interest, please consider creating an issue for the Greengrass team to track a feature request.

Please let me know if this helps, or if you have additional questions!

AWS
Gavin_A
已回答 2 年前
  • Thanks for your response. I now have a better understanding. Thanks for the detailed explanation. It might be better to allow client devices to make MQTT connections directly to AWS IoT Core. I've raised an issue (https://github.com/aws-greengrass/aws-greengrass-nucleus/issues/1190) on github.

  • Client devices can connect directly to IoT Core if their is a policy associated with the certificate and there is a network path. Local connectivity to Greengrass can reduce latency and allow for local communication when connectivity to the cloud isn't available. One pattern may be to have local devices connect to IoT Core with Greengrass as an alternative, or two have two connections (one to IoT Core and one to Greengrass). Endless possibilities! :)

  • I'll try to do it in a way that has two connections. Thanks again!

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南