Skip to content

9illes/log-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Log viewer

Description

This project is a log viewer for cloudfront logs. It allows to view the logs in a web interface and to filter the requests by project, date, status code, googlebot, etc.

It is an experimental project ported to Go for testing purpose and is not crafted for large log volume.

Steps

  1. Download all cloudfront log files from an AWS S3 bucket
  2. Aggregate the log files into a single file using the scripts\aggregate.sh script
  3. Preprocess the main log file (split into multiple files)
  4. Start the web interface and open http://localhost:8080

Usage

Build

make build
build/logs preprocess -s default -i var/23-05-25.log -o var

Development

Help

make

Preprocess log requests

# Create preprocessed log files for the 'default' project using the cloudfront log file 'var/23-05-25.log'
go run main.go preprocess -s default -i var/23-05-25.log -o var

Start the web interface

Autorebuild and restart the web interface when a file is changed. Require Air to be installed (go install github.com/cosmtrek/air@latest). Install air to automatically rebuild and restart the web interface when a file is changed.

make live

Enable profiling

pprof is disabled by default. To enalbe it, use the -i flag on the serve sub-command.

go run main.go serve -i

Open pprof Web UI

Resources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published