Secode has asked for the wisdom of the Perl Monks concerning the following question:
Greetings to all at Perlmonks,
I have a log file from a Pix firewall the record of the syslog looks like this:
2006-03-20 00:02:48,Local4.Warning,1.1.1.10,Mar 19 2006 23:56:32: %PIX-4-106023: Deny udp src inside:1.1.1.1/1161 dst outside:2.2.2.2/53 by access-group "inside_access_in".In the syslog file there are mutiple instances of the same src ip address with different or the same dst address's. I am not interested in the src port.
I need to sort the file so that I can have a report based on src IP address with all the associated dst IP address's,dst port,src interface and dst interface.
I prsume(not too sure)the best structure would be an array of arrays - I can get the data from the syslog file into the array and strip the(/ : , ") out of it but have no idea how to sort into the format I need. Any help with this would be really apprciated as once I can understand how to do this I have a number of other projects I would be able to do based on the same kind of thing. I can mail the syslog file if it would help.
Thanks
Pierre
Formatting added by GrandFather
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sorting log files with IP addresses (duplicates)
by strat (Canon) on Apr 21, 2006 at 09:13 UTC | |
by salva (Canon) on Apr 21, 2006 at 09:37 UTC | |
|
Re: Sorting log files with IP addresses (duplicates)
by jwkrahn (Abbot) on Apr 21, 2006 at 22:46 UTC | |
by salva (Canon) on Apr 22, 2006 at 10:52 UTC | |
by jwkrahn (Abbot) on Apr 23, 2006 at 01:40 UTC | |
by Secode (Novice) on Apr 24, 2006 at 09:52 UTC |