Skip to content

paranormal/blooper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to blooper

Blooper is squid-like creatures that are found in the ocean. It can also write squid access log into a database (I believe any sequel-support database). Should you write a squid access log into a data base, you won't have to catch a blooper in the ocean of errors for that. I have already tamed one, and you are free to use it.

The idea is shamelessly stolen from logmysqldaemon script.

Installation

gem install (pg|mysql|oracle|sqlite|etc sequel database adapter)
gem install blooper

Squid configuration

logformat squid_log time %{%Y-%m-%d_%H:%M:%S%z}tl time_response %tr mac_source %>eui ip_source %>a squid_request_status %Ss http_status_code %03>Hs http_reply_size %<st http_request_method %rm http_request_url %ru user_name %un squid_hier_code %Sh ip_destination %<a http_content_type %mt
access_log daemon:{adapter:postgres,database:squid,username:squid,password:squid,host:db,encoding:utf8} squid_log
logfile_daemon /usr/local/bin/blooper
  1. The column names are dynamic, here time is a column name, %{%Y-%m-%d_%H:%M:%S%z} is a value that will be written into that column.

  2. The second string contains database access information, the credential depends on adapter, tested only with postgres.

  3. The third string is a full path to the executable ($ which blooper).

Database configuration

createdb squid
psql squid < sql/pg_schema.sql
psql squid < sql/pg_data.sql

Or use your own schema integration, just specify the proper format into the logformat variable in squid.conf.

About

squid's access log collector

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published