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년 전426회 조회
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!

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인