How can you set up secure remote monitoring for your Raspberry Pi single board computer (SBC) in your IoT device? You will want to target misbehaving devices that include the Raspberry Pi SBC easily. At some point in time, as you move from proof of concept to production and when your device fleet grows large enough, you want to be up-front about catching misbehaving devices. You will want to identify them in a monitoring hub, and from here you will want to access and diagnose the device. Ideally, you will want to get your monitoring functionality from the same provider who is also providing you with OTA software updating and remote terminal capabilities. When you move to a certain number of devices in the field you must become proactive rather than reactive, let’s say at a large scale of more than 1000 devices. If you have monitoring set up, you can identify problems with devices and fix them quickly.
You would look to monitor certain device metrics within defined intervals so you can identify misbehaving devices early on and then you use remote terminal access to fix the problem. The metrics to monitor would typically be network information such as traffic, CPU load, memory usage, application health, and response time. These are ones you start monitoring in terms of the basic hardware. You could also monitor the connections, connected to an external sensor and run a health check to see if it is still providing readings.
A key consideration in Raspberry Pi monitoring is that the Raspberry Pi does not have a real time clock (RTC) so it depends on a Network Time Protocol (NTP) connection to record the time and date of key operations. This is a critical function in monitoring.
In monitoring a Raspberry Pi, the following critical operations are typically tracked:
In the case of the operating system, whether you choose Debian (Raspian for Raspberry Pi OS) or a custom Linux distribution in the form of Yocto or Buildroot, this must be monitored carefully. You must have a routine that looks for the OS version running on the Raspberry Pi SBC and check if updates need to be made. This ensures optimal system performance of the device and protects against security vulnerabilities, safeguarding the device (and the network) from potential attacks from malicious actors.
Also consider these useful articles on Raspberry Pi: