From 585785847b1d7e43d813c529825ab14159636e4a Mon Sep 17 00:00:00 2001 From: cschantz Date: Mon, 3 Nov 2025 20:42:56 -0500 Subject: [PATCH] Filter out cPanel system logs from 500 error tracker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FILTERED LOG FILES: - proxy (Apache reverse proxy logs) - localhost (local connections) - default (default vhost) - cpanel, webmail, whm (cPanel services) - cpcalendars, cpcontacts, webdisk (cPanel apps) These are cPanel system services, not actual customer domains. They were showing as 'unknown' user and cluttering results. Now only tracks actual customer domain 500 errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- modules/website/500-error-tracker.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/website/500-error-tracker.sh b/modules/website/500-error-tracker.sh index 86f9e4e..905b3df 100755 --- a/modules/website/500-error-tracker.sh +++ b/modules/website/500-error-tracker.sh @@ -58,9 +58,12 @@ total_500s=0 for log in "$DOMLOGS_DIR"/*; do [ -f "$log" ] || continue [[ "$log" =~ (bytes_log|offset|error_log|ftpxferlog|-ssl_log)$ ]] && continue - + domain="${log##*/}" domain="${domain%%-*}" + + # Skip non-domain system logs (proxy, localhost, etc.) + [[ "$domain" =~ ^(proxy|localhost|default|cpanel|webmail|whm|cpcalendars|cpcontacts|webdisk)$ ]] && continue # Find cPanel user for this domain user=$(grep -l "DNS.*$domain" /var/cpanel/users/* 2>/dev/null | head -1 | xargs basename 2>/dev/null)