[Unit]
Description=IDS Analytics Aggregator - Hourly Traffic Statistics
After=network.target postgresql.service

[Service]
Type=oneshot
User=ids
Group=ids
WorkingDirectory=/opt/ids/python_ml
EnvironmentFile=-/opt/ids/.env

# Execute hourly aggregation
ExecStart=/opt/ids/python_ml/venv/bin/python3 /opt/ids/python_ml/analytics_aggregator.py hourly

# Logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=ids-analytics

[Install]
WantedBy=multi-user.target
