You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps with a flag, a user could specify their intention to load the nginx logs into goaccess.
The pan-collect-logs.sh script could create an additional directory: logs/${SITENAME}/access_logs. After the rsync action the script could extract all nginx-access-log-{date}.gz files and place them into the access logs directory. Then the user only needs to run goaccess against that directory to ingest all available logs.
The text was updated successfully, but these errors were encountered:
Here is my stab at it. I execute this script from within the logs/${SITENAME} directory
#!/bin/bash
if [ ! -d "access_logs" ]; then
mkdir access_logs
fi
for server in $(ls |grep appserver_)
do
for log in $(ls $server/logs/nginx |grep nginx-access.log-)
do
gzip -dk $server/logs/nginx/$log
file=$(echo $log |cut -f 1-2 -d '.')
mv $server/logs/nginx/$file access_logs/$server-$file
done
done
I didn't include the current access log that is not compressed.
The goaccess command could be added as well.
Perhaps with a flag, a user could specify their intention to load the nginx logs into goaccess.
The pan-collect-logs.sh script could create an additional directory: logs/${SITENAME}/access_logs. After the rsync action the script could extract all nginx-access-log-{date}.gz files and place them into the access logs directory. Then the user only needs to run goaccess against that directory to ingest all available logs.
The text was updated successfully, but these errors were encountered: