I would like to improve a fault tolerance of my edge gateways by running an additional software watchdog inside of Edge Agent. In order to do so, I plan to build a latch by setting a variable like the following:
(1) for Device: Connect;
(0) for Device: Disconnect;
(0) for Device: Startup.
If the agent doesn’t get connected to Losant after 10 Minutes from Disconnect or Startup events, the edge host OS will get a command to reboot the gateway.
Something like that:
My Question is: Is there a way to check Losant conneciton status continuosly from the container? Like every minute with a timer? I want to avoid a situation, when the value was not set for some reason during the connection and the gateway reboots without a reason.
Suggestions to improve the logic are also welcome.