# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. barracuda_waf_access = { plugin_version = "1.0.0" info.1.manufacturer = "Barracuda" info.1.device = "Web Application Firewall (Access)" info.1.version = "7.4.0.022" # 2010-08-09 - 1.0 - Benson - Initial implementation. # 2010-10-01 - 1.1 - MSG - Edited info lines. # The name of the log format log.format.format_label = "Barracuda WAF Access Log Format" log.miscellaneous.log_data_type = "syslog_required" log.miscellaneous.log_format_type = "web_server" # The log is in this format if any of the first ten lines match this regular expression log.format.autodetect_regular_expression = "[^ ]+ [^ ]+ [^ ]+ [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]+ [\+|-][0-9]+ " log.format.date_format = "auto" log.format.time_format = "auto" # Log fields log.fields = { host = "" logon_id = "" url = "" referer = "" http_status_code = "" bytes_received = "" events = "" } # log.fields # Log Parsing Filters log.parsing_filters.parse = ` #2010-08-05 09:00:27 Local1.Info 192.168.1.1 www.foo.org.tw "-" /strike/ 2010-08-05 09:00:33.519 +0800 : http://www.foo.org.tw/strike/ 200 4760 if (matches_regular_expression(v.syslog_message, '([^ ]+) ([^ ]+) ([^ ]+) ([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]) ([0-9][0-9]:[0-9][0-9]:[0-9][0-9]).[0-9]+ [\+|-][0-9]+ (.*)$')) then ( set_collected_field('', 'host', $1); set_collected_field('', 'logon_id', $2); set_collected_field('', 'url', $3); set_collected_field('', 'date', $4); set_collected_field('', 'time', $5); v.message = $6; #: http://www.foo.org.tw/strike/ 200 4760 #"-" 200 4593 if (matches_regular_expression(v.message, ": ([^ ]+) ([0-9]+) ([0-9]+)")) then ( set_collected_field('', 'referer', $1); set_collected_field('', 'http_status_code', $2); set_collected_field('', 'bytes_received', $3); ); else if (matches_regular_expression(v.message, "([^ ]+) ([0-9]+) ([0-9]+)")) then ( set_collected_field('', 'referer', $1); set_collected_field('', 'http_status_code', $2); set_collected_field('', 'bytes_received', $3); ); set_collected_field('', 'events', 1); accept_collected_entry('', false); ); ` # Database fields database.fields = { host = "" logon_id = "" url = "" referer = "" http_status_code = "" } # database.fields database.numerical_fields = { events = { default = true } bytes_received = { default = true type = "float" display_format_type = "bandwidth" } } # database.numerical_fields create_profile_wizard_options = { # How the reports should be grouped in the report menu report_groups = { } # report_groups } # create_profile_wizard_options } # barracuda_waf_access