Skip to content

ogbbc-webmasters/Access-Logs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Access Logs

Pull Logs

Usage:

chmod +x pull-logs.sh
./pull-logs.sh

Notes:

  • Ensure .env.local exists in the project root with REMOTE_USER, REMOTE_HOST and REMOTE_PATH set.
  • Copy .env.example and replace with actual values
  • .env.local and data/ are ignored by git per .gitignore.

View Logs

Use the latest pulled log directory to generate an HTML report with charts.

On NixOS, enter a shell with the required tools first:

nix shell nixpkgs#goaccess
latest="$(find data -mindepth 1 -maxdepth 1 -type d | sort | tail -n 1)"
site_dir="$(find "$latest" -mindepth 1 -maxdepth 1 -type d | sort | head -n 1)"

{
  find "$site_dir" -maxdepth 1 -type f -name 'transfer*.log' -exec zcat -f {} +
  find "$site_dir" -maxdepth 1 -type f -name 'transfer.log-*.zip' -exec zcat -f {} +
} | goaccess --log-format COMBINED -j 4 --agent-list -o report.html -

TODO: make a script for automating the above command.

About

Utilities for managing/monitoring access logs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages