Skip to content

Data Retention Policy

Simple IoT periodically purges historical data to prevent disk bloat.

Purge Schedule

Runs daily at 3:00 AM (Asia/Shanghai), scheduled by DataRetentionService.

PostgreSQL Data

DataDefault RetentionConfig Key
Cleared alarms90 dayssimple.iot.retention.alarm-days
Push logs30 dayssimple.iot.retention.push-log-days
Rule execution logs30 dayssimple.iot.retention.rule-exec-log-days

InfluxDB Telemetry

DataDefault RetentionConfig Key
Device telemetry (properties)180 dayssimple.iot.retention.telemetry-days

ponytail: hard delete, no downsampling. Add CQ or downsampling task when query performance degrades.

Configuration

yaml
simple:
  iot:
    retention:
      alarm-days: 90
      push-log-days: 30
      rule-exec-log-days: 30
      telemetry-days: 180

Released under the MIT License.