Implement systemd service management for ML backend and Syslog parser with API key authentication and robust error handling across frontend and backend. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 7a657272-55ba-4a79-9a2e-f1ed9bc7a528 Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Event-Id: e0ddd146-1e7d-40e4-8607-ef8d247a1f49 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/449cf7c4-c97a-45ae-8234-e5c5b8d6a84f/7a657272-55ba-4a79-9a2e-f1ed9bc7a528/n4Q2eeE
31 lines
631 B
Desktop File
31 lines
631 B
Desktop File
[Unit]
|
|
Description=IDS Syslog Parser (Network Logs Processor)
|
|
After=network.target postgresql.service rsyslog.service
|
|
Requires=postgresql.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=ids
|
|
Group=ids
|
|
WorkingDirectory=/opt/ids/python_ml
|
|
EnvironmentFile=/opt/ids/.env
|
|
|
|
# Comando esecuzione
|
|
ExecStart=/usr/bin/python3 syslog_parser.py
|
|
|
|
# Restart automatico in caso di crash
|
|
Restart=on-failure
|
|
RestartSec=10s
|
|
|
|
# Limiti risorse
|
|
LimitNOFILE=65536
|
|
MemoryMax=1G
|
|
|
|
# Logging
|
|
StandardOutput=append:/var/log/ids/syslog_parser.log
|
|
StandardError=append:/var/log/ids/syslog_parser.log
|
|
SyslogIdentifier=ids-syslog-parser
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|