# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. sonic_wall5 = { plugin_version = "1.0.1" # 31/07/2006 - 1.0 - added support for yyyy/mm/dd logs - Graham # 2011-07-19 - 1.0.1 - MSG - Edited info lines. info.1.manufacturer = "SonicWall" info.1.device = "SonicWall 5" info.1.version.1 = "" # SonicWall 5 # The name of the log format log.format.format_label = "SonicWall 5" log.miscellaneous.log_data_type = "network" log.miscellaneous.log_format_type = "firewall" # 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]* [^ ]*[ ]*[A-Za-z ]* -[ ]*Source:[0-9.]*, [0-9]*, [A-Z]* -[ ]*Destination:[0-9.]*, [0-9]*, [A-Z]*" # The format of dates and times in this log log.format.date_format = "mm/dd/yyyy" log.format.time_format = "hh:mm:ss" # All log field parsing will be done using the parsing filters log.format.parse_only_with_filters = "true" statistics.miscellaneous.entry_name = "events" # Log fields log.fields = { date = { label = "$lang_stats.field_labels.date" type = "date" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # date time = { label = "$lang_stats.field_labels.time" type = "time" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # time action = { label = "$lang_stats.field_labels.action" type = "flat" index = 0 subindex = 0 } # action source_ip = { label = "$lang_stats.field_labels.source_ip" type = "host" index = 0 subindex = 0 hierarchy_dividers = "." left_to_right = false leading_divider = "false" } # source_ip source_port = { label = "$lang_stats.field_labels.source_port" type = "flat" index = 0 subindex = 0 } # source_port sourcenetwork = { label = "$lang_stats.field_labels.sourcenetwork" type = "flat" index = 0 subindex = 0 } # sourcenetwork destination_ip = { label = "$lang_stats.field_labels.destination_ip" type = "flat" index = 0 subindex = 0 } # destination_ip destination_port = { label = "$lang_stats.field_labels.destination_port" type = "flat" index = 0 subindex = 0 } # destination_port destination_network = { label = "$lang_stats.field_labels.destination_network" type = "flat" index = 0 subindex = 0 } # destination_network reason = { label = "$lang_stats.field_labels.reason" type = "flat" index = 0 subindex = 0 } # reason rule = { label = "$lang_stats.field_labels.rule" type = "flat" index = 0 subindex = 0 } # rule } # log.fields # # Log Parsing Filters log.parsing_filters = { # Parse out date, time, action, Source IP, source port, SourceNetwork, Destination IP, Destination port, destination network 1 = { label = "1" comment = "" value = "collect_fields_using_regexp('^()([0-9]+/[0-9]+/[0-9]+) ([0-9]+:[0-9]+:[0-9]+)\\\\.[0-9]* [^ ]*[ ]*([A-Za-z ]*) -[ ]*Source:([0-9.]*), ([0-9]*), ([A-Z]*) -[ ]*Destination:([0-9.]*), ([0-9]*), ([A-Z]*)', '*KEY*,date,time,action,source_ip,source_port,sourcenetwork,destination_ip,destination_port,destination_network')" } # 1 # Parse out date, time, action, Source IP, Unknown1, SourceNetwork, Destination IP, Unknown2, Destination network, Reason, Rule 2 = { label = "2" comment = "" value = "collect_fields_using_regexp('^()([0-9]+/[0-9]+/[0-9]+) ([0-9]+:[0-9]+:[0-9]+)\\\\.[0-9]* [^ ]*[ ]*([A-Za-z ]*) -[ ]*Source:([0-9.]*), ([0-9]*), ([A-Z]*) -[ ]*Destination:([0-9.]*), ([0-9]*), ([A-Z]*) -[ ]*\\'([^\\']*)\\' -[ ]*Rule ([0-9]*)', '*KEY*,date,time,action,source_ip,source_port,sourcenetwork,destination_ip,destination_port,destination_network,reason,rule')" } # 2 date_time = { label = "yyyy/mm/dd date filter" comment = "This collects the date from entries with yyyy/mm/dd format lines of Sonic Wall" value = `if (matches_regular_expression(get_collected_field('', 'date'), '^([0-9][0-9][0-9][0-9])/([0-9][0-9])/([0-9][0-9])')) then ( set_collected_field('', 'date', $2 . '/' . $3 . '/' . $1); ); ` } # date_time # Accept the collected field accept = { label = "3" comment = "" value = "accept_collected_entry_using_regexp('()', false)" } # accept } # log.parsing_filters # Database fields database.fields = { date_time = { label = "$lang_stats.field_labels.date_time" log_field = "date_time" type = "string" suppress_top = 0 suppress_bottom = 3 display_format_type = "date_time" } # date_time day_of_week = { label = "$lang_stats.field_labels.day_of_week" log_field = "day_of_week" type = "string" suppress_top = 0 suppress_bottom = 2 display_format_type = "day_of_week" } # day_of_week hour_of_day = { label = "$lang_stats.field_labels.hour_of_day" log_field = "hour_of_day" type = "string" suppress_top = 0 suppress_bottom = 2 display_format_type = "hour_of_day" } # hour_of_day action = { label = "$lang_stats.field_labels.action" log_field = "action" type = "string" suppress_top = 0 suppress_bottom = 2 } # action source_ip = { label = "$lang_stats.field_labels.source_ip" log_field = "source_ip" type = "string" suppress_top = 0 suppress_bottom = 2 } # source_ip source_port = { label = "$lang_stats.field_labels.source_port" log_field = "source_port" type = "string" suppress_top = 0 suppress_bottom = 2 } # source_port sourcenetwork = { label = "$lang_stats.field_labels.sourcenetwork" log_field = "sourcenetwork" type = "string" suppress_top = 0 suppress_bottom = 2 } # sourcenetwork destination_ip = { label = "$lang_stats.field_labels.destination_ip" log_field = "destination_ip" type = "string" suppress_top = 0 suppress_bottom = 2 } # destination_ip destination_port = { label = "$lang_stats.field_labels.destination_port" log_field = "destination_port" type = "string" suppress_top = 0 suppress_bottom = 2 } # destination_port destination_network = { label = "$lang_stats.field_labels.destination_network" log_field = "destination_network" type = "string" suppress_top = 0 suppress_bottom = 2 } # destination_network reason = { label = "$lang_stats.field_labels.reason" log_field = "reason" type = "string" suppress_top = 0 suppress_bottom = 2 } # reason rule = { label = "$lang_stats.field_labels.rule" log_field = "rule" type = "string" suppress_top = 0 suppress_bottom = 2 } # rule } # database.fields # Log Filters log.filters = { mark_entry = { label = '$lang_admin.log_filters.mark_entry_label' comment = '$lang_admin.log_filters.mark_entry_comment' value = 'events = 1;' } # mark_entry } # log.filters database.numerical_fields = { events = { label = "$lang_stats.field_labels.events" default = true requires_log_field = false type = "int" display_format_type = "integer" entries_field = true } # events visitors = { label = "$lang_stats.field_labels.visitors" default = false requires_log_field = true log_field = "source_ip" type = "unique" display_format_type = "integer" } # visitors } # database.numerical_fields create_profile_wizard_options = { date_time_tracking = true host_tracking = true # How the reports should be grouped in the report menu report_groups = { date_time_group = "" action = true source_ip = true source_port = true sourcenetwork = true destination_ip = true destination_port = true destination_network = true reason = true rule = true } # report_groups } # create_profile_wizard_options not_supported = { sessions = true pageviews = true bandwidth = true } # not_supported } # sonic_wall5