java - Text Extraction based on defined format? -


  1. i have work on task there log file provided me.
  2. this logfile generated cisco asa firewall.
  3. 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

  1. 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?
  2. 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

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -