LOGAR Linux Edge Forwarder
Lightweight edge log forwarder for Linux servers running systemd.
Features
- Zero Local State: No local SQLite database or state tracking on the edge server.
- Edge Noise Stripping: Strips conversational/informational noise (
INFO,DEBUG) directly at the source viajournalctl -p warning. - End-to-End OpenPGP Encryption: Encrypts logs using the server's public key; decrypted exclusively on the cloud hub.
- Authenticated TCP Socket: Direct, low-overhead TCP streaming with token authentication.
- No GPG Binary Required: Pure-Python implementation (
pgpy+cryptography).
Installation
python3 -m pip install -r requirements.txt
Configuration
Place client_config.json generated by the server (Server.py --create-client-config) in the same directory as Linux_Client.py.
Running the Forwarder
python3 Linux_Client.py --hours 6
Cron / Systemd Timer Deployment
Option A: Cron Job (Every 3 hours)
0 */3 * * * cd /opt/logar && /usr/bin/python3 Linux_Client.py --hours 6 >> /var/log/logar_client.log 2>&1
Option B: Systemd Service & Timer
- Create
/etc/systemd/system/logar-forwarder.service:
[Unit]
Description=LOGAR Edge Forwarder
After=network.target
[Service]
Type=oneshot
WorkingDirectory=/opt/logar
ExecStart=/usr/bin/python3 /opt/logar/Linux_Client.py --hours 6
- Create
/etc/systemd/system/logar-forwarder.timer:
[Unit]
Description=Run LOGAR Edge Forwarder every 3 hours
[Timer]
OnBootSec=5min
OnUnitActiveSec=3h
Persistent=true
[Install]
WantedBy=timers.target
- Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable --now logar-forwarder.timer