Troubleshooting
Quick Diagnosis
# Check container status
docker ps | grep aggregate
# Check recent logs
docker logs aggregate-time-windows --tail 50 2>&1 | grep -i error
# Test with sample data
curl -X POST http://localhost:8080/sensors \
-H "Content-Type: application/json" \
-d '{"sensor_id": "temp-001", "temperature": 72, "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}'
Common Issues
Windows not closing / no output
Cause: Not enough data or timestamp field not recognized
Fix: Check timestamp field name and ensure window period is short enough for testing:
Partial snippet: system window settings
buffer:
system_window:
size: 1m
timestamp_mapping: root = this.timestamp
Aggregates are wrong
Cause: Data arriving out of order or timestamps in wrong timezone
Fix: Add allowed lateness and normalize timestamps:
Partial snippet: timestamp normalization before the window
pipeline:
processors:
- mapping: |
root = this
root.timestamp = this.timestamp.ts_parse("2006-01-02T15:04:05Z07:00").ts_format("2006-01-02T15:04:05Z")
buffer:
system_window:
size: 5m
timestamp_mapping: root = this.timestamp
Memory growing over time
Cause: Window state not being cleaned up
docker stats aggregate-time-windows --no-stream
Fix: Add window expiry and limit group cardinality:
Partial snippet: bounded system window
buffer:
system_window:
size: 5m
timestamp_mapping: root = this.timestamp
Late data being dropped
Cause: allowed_lateness too short
Fix: Choose a larger maintained system window and test out-of-order input against the installed Edge release:
Partial snippet: larger system window
buffer:
system_window:
size: 10m
timestamp_mapping: root = this.timestamp
Still stuck?
- Add debug logging:
logger: {level: DEBUG} - Check the Complete Pipeline for reference config
- Review Deduplicate Events for handling duplicates