Log Management with journalctl
All PROPPR services log to systemd journal with dedicated identifiers.View Service Logs
Log Output Formats
Export Logs
Service Health Checks
Check Service Status
Automated Health Check Script
Create a health check script at/opt/proppr/scripts/health_check.sh:
health_check.sh
Performance Monitoring
CPU and Memory Usage
MongoDB Monitoring
Network Monitoring
Alert Detection
Monitor for Errors
Create a script to watch for errors and send alerts:error_monitor.sh
Set Up Cron Jobs for Monitoring
Add to/etc/crontab:
Manual Pipeline Execution
For services that need manual triggering (like StatsUpdateFM):Log Retention
Configure Journal Size
Edit/etc/systemd/journald.conf:
/etc/systemd/journald.conf
Manual Log Cleanup
Troubleshooting Common Issues
Service not logging to journal
Service not logging to journal
Verify the service file has:Reload and restart:
No logs available
No logs available
Check if journald is running:Check journal disk usage:
High memory usage
High memory usage
Check which service is consuming memory:Restart the service to clear memory:
Service restarting frequently
Service restarting frequently
Check for crashes in logs:Check system resources:
Remote Monitoring
SSH Monitoring Commands
Create Monitoring Aliases
Add to~/.bashrc or ~/.zshrc:
Next Steps
Service Configuration
Review systemd service setup
Production Setup
Review production deployment guide