java - Text Extraction based on defined format? -
- i have work on task there log file provided me.
- this logfile generated cisco asa firewall.
the log lines this:
2013-05-09 11:04:32 local4.debug 172.24.100.111 %asa-7-710005: tcp request discarded 172.17.38.35/63867 inside:172.24.100.111/443 2013-05-09 11:04:32 local4.debug 172.24.100.111 %asa-7-609002: teardown local-host outside:207.46.15.252 duration 0:00:00 2013-05-09 11:04:32 local4.debug 172.24.100.111 %asa-7-609001: built local-host outside:64.145.75.27 2013-05-09 11:04:32 local4.debug 172.24.100.111 %asa-7-609002: teardown local-host outside:64.145.75.27 duration 0:00:00 2013-05-09 11:04:32 local4.debug 172.24.100.111 %asa-7-609001: built local-host outside:216.156.147.26 2013-05-09 11:04:32 local4.debug 172.24.100.111 %asa-7-609002: teardown local-host outside:216.156.147.26 duration 0:00:00 2013-05-09 11:04:33 local4.debug 172.24.100.111 %asa-7-609001: built local-host outside:74.125.224.220 2013-05-09 11:04:33 local4.debug 172.24.100.111 %asa-7-609002: teardown local-host outside:74.125.224.220 duration 0:00:00 2013-05-09 11:04:34 local4.debug 172.24.100.111 %asa-7-710005: udp request discarded 172.24.6.11/68 inside:255.255.255.255/67
i looked around , found these rules defined in handbook
questions
- what the best way extract each piece of information based on rules mentioned in handbook, rather running regular expressions , taking value out? mean can generate rule based parsing?
- given 1 of logs, sure there many log formats supported many firewalls , have own guidelines how read, there generic framework can built? framework/library helps that?
i looking guidance since don't know in area.
thank you
Comments
Post a Comment