IoT Monitoring Guide
The IoT Monitoring module provides automated heartbeat tracking for remote devices, ensuring that connectivity issues or hardware failures are detected and reported promptly.
Configuration
Monitoring is configured per asset in the t_iot_monitor_config table. The key parameters are:
interval_minutes
The base duration (in minutes) between expected heartbeats. For a daily report, this is typically 1440 minutes.
max_missed_intervals
The number of full intervals the system should wait before triggering an alert.
Setting this to 0 means the alert triggers as soon as the first interval is exceeded.
Alert Logic
The system calculates a Grace Period to determine when a device is considered "DOWN".
Grace Period (Minutes) = interval_minutes * (max_missed_intervals + 1)
Key Principles
- UTC Consistency: All timestamps (Last Seen, Last Alert, and System Time) are processed in UTC to avoid timezone-related false alerts.
- Batch Alerting: To optimize costs, alerts are batched by recipient (Phone or Email). If multiple devices under the same tenant fail, a single consolidated notification is sent.
- 5-Minute Resolution: The monitoring task runs every 5 minutes. Alerts will trigger on the first execution cycle after the grace period expires.
Common Examples
1. Daily Report at Midnight SG (16:00 UTC)
If a device reports daily at 16:00 UTC, but usually arrives at 16:02 UTC, and you want an alert at 16:10 UTC:
interval_minutes: 1448 (1440m + 8m buffer)max_missed_intervals: 0
2. High-Frequency Heartbeat (Every 10 Minutes)
If a device reports every 10 minutes and you want to allow 2 missed heartbeats before alerting:
interval_minutes: 10max_missed_intervals: 2- Result: Alert triggers after 30 minutes of inactivity.