FriskByBergen / python-friskby

A friskby python module that is the foundation for the Raspberry Pi client code
3 stars 4 forks source link

Reboot on missing heartbeat #44

Open pgdr opened 6 years ago

pgdr commented 6 years ago

Should we add a service friskby-reset that reboots the client unless it can verify that the last submitted sample was done the last, say, 6 hours?

That service simply downloads (via the sensor API) the last measurement, and if either unsuccessful or if the timestamp is more than 6 hours ago, it reboots the device.

Thoughts?

semafor commented 6 years ago

Sounds good. friskby-reset should explain why it determined a reboot was in order. So if the checks for sampling or submission activity fails, it should log something/maybe push a metric "home" (friskby site).

Might prove useful for determining if a device or sampler needs replacing.