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年前406ビュー
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!

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ