in reply to Re^5: Real time log parser
in thread Real time log parser
1325521875.165 93 127.0.0.1 TCP_MISS/302 667 GET http://www.google.co.uk/sorry/?continue=http://www.google.co.uk/search%3Fq%3Just+an+axample - ROUNDROBIN_PARENT/proxy_218 text/html
Should left in @cutoff after second line: proxy_218 In third line script must search against squid.conf strings with proxy_218, and it shuould find:my @cutoff = grep /proxy_/,@_; s/ROUNDROBIN_PARENT\///g for @cutoff; @cutoff = grep /@cutoff/,@cfg;
cache_peer 111.222.121.1 parent 60099 0 no-query no-digest originserver name=proxy_218 round-robin login=login:pass connect-timeout=3
cache_peer_access proxy_218 allow all
These lines must be moved to some file, and squid must be reloaded. I've executed my script like this:# ./MY__SCRIPT.pl 1325521875.165 93 127.0.0.1 TCP_MISS/302 667 GET http://www.google.co.uk/sorry/?continue=http://www.google.co.uk/search%3Fq%3Just+an+axample - ROUNDROBIN_PARENT/proxy_218 text/html
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Real time log parser
by Eliya (Vicar) on Jan 02, 2012 at 22:51 UTC | |
by kazak (Beadle) on Jan 03, 2012 at 10:33 UTC | |
by Eliya (Vicar) on Jan 03, 2012 at 10:51 UTC |