Hi everyone,
I'm planning to set up a centralized logging system for certain websites hosted on Enhance. My goal is to export the OpenLiteSpeed access and error logs to a remote server running Grafana and Loki for better monitoring and analysis.
Here is my planned architecture:
- Production Server: Managed by Enhance, running websites in OpenLiteSpeed.
- Monitoring Server: A separate server where I will run Grafana, Loki, and Grafana Alloy using Docker Compose. I will use a Cloudflare Tunnel to securely access the Grafana dashboard.
My plan is to run a Grafana Alloy container on the Production Server to act as the log shipping agent. Its role will be to read the OLS logs and forward them to the Loki instance on my monitoring server.
My main question is about the best way to access the OLS log files from the Alloy container. I've identified that Enhance centralizes web server logs in the /var/local/enhance/webserver_logs/ directory, using UUID-based filenames.
Specifically, I'd like to ask:
- What is the recommended way to make these logs accessible to a user-managed Docker container (Grafana Alloy) on the same host?
- Is using a Docker bind mount in my Alloy container's configuration (e.g., mounting /var/local/enhance/webserver_logs/ as a read-only volume) the correct approach?
- Are there any potential file permission issues or conflicts with the Enhance platform that I should be aware of when accessing these log files from an external container?
- Is there a more "Enhance-native" method for log shipping that I might have missed?
Any guidance or best practice tips from the community would be greatly appreciated.
Thanks in advance for reading!