This demo demonstrates usage of the AWS IoT Device Defender Client library.
This demo application uses the AWS IoT Device Defender Client library, MQTT Client library, and JSON library to interact with the AWS IoT Device Defender service.
The demo reports the following metrics to the AWS IoT Device Defender Service:
The demo gets the above metrics by reading /proc/net/dev
, /proc/net/tcp
and, /proc/net/udp
. It then constructs a JSON report in the format as expected by the AWS IoT Device Defender service. The constructed JSON report is then published on the device defender MQTT topic reserved for publishing JSON reports. The demo then waits for a report accepted response, and ensures that the response contains the same report Id as was sent in the request.