feat: add comprehensive upload testing and monitoring scripts for XMPP protocol

This commit is contained in:
2025-07-18 10:01:49 +00:00
parent 614d4f5b38
commit edb0c2a9c8
4 changed files with 482 additions and 0 deletions

34
monitor_nginx.sh Executable file
View File

@ -0,0 +1,34 @@
#!/bin/bash
# Terminal 1: nginx Monitoring Script
echo "=== NGINX ACCESS LOG MONITOR ==="
echo "Monitoring: /var/log/nginx/share_access.log"
echo "Press Ctrl+C to stop"
echo ""
echo "Waiting for upload requests..."
echo "$(date): Monitor started"
echo ""
# Monitor nginx access logs with timestamps
sudo tail -f /var/log/nginx/share_access.log | while read line; do
if [[ -n "$line" ]]; then
echo "[$(date '+%H:%M:%S')] NGINX: $line"
# Highlight important patterns
if echo "$line" | grep -q "PUT"; then
echo "*** PUT REQUEST DETECTED ***"
fi
if echo "$line" | grep -q " 401 "; then
echo "!!! AUTH FAILURE (401) !!!"
fi
if echo "$line" | grep -q " 200 "; then
echo "✅ SUCCESS (200) ✅"
fi
if echo "$line" | grep -q " 40[0-9] \| 50[0-9] "; then
echo "❌ ERROR RESPONSE ❌"
fi
fi
done