net_gear_fvl328 = { # Version Changes: # 1.0Beta - New plug-in. # Plug-in Version plugin_version = "1.0beta" # The name of the log format log.format.format_label = "NetGear FVL328 Log Format (logging to syslog)" log.miscellaneous.log_data_type = "syslog_required" log.miscellaneous.log_format_type = "network_device" # The log is in this format if any of the first ten lines match this regular expression log.format.autodetect_regular_expression = '[0-9]+ [A-Z][a-z]+ [0-9]+ [0-9:]+ \\([^)]+\\) [0-9.]+ (UDP|TCP)' # A log entry is a packet statistics.miscellaneous.entry_name = "packets" statistics.miscellaneous.visitor_name = "unique source IP" # Log fields log.fields = { device_name = "" device_ip = "" operation = "" source_ip = { type = "host" hierarchy_dividers = "." } # source_ip source_port = "" destination_ip = "" destination_port = "" action = "" rule = "" } # log.fields # Log Parsing Filters log.parsing_filters.parse = ` if (matches_regular_expression(v.syslog_message, '([0-9]+ [A-Z][a-z]+ [0-9]+ [0-9:]+) (\\([^)]+\\)) ([0-9.]+) ([^ ]+) Packet\\[*([^-]*)\\]* - Source:([0-9.]+),*([0-9 ]*),[WL]AN - Destination:([0-9.]+),*([0-9 ]*),[WL]AN \\[([^]]+)\\] - \\[([^]]+)\\]\\^M *$')) then ( v.device_date_time = $1; set_collected_field('', 'device_name', substr($2, 1, length($2)-2)); set_collected_field('', 'device_ip', $3); set_collected_field('', 'operation', $4 . ' Packet ' . $5); set_collected_field('', 'source_ip', $6); set_collected_field('', 'source_port', $7); set_collected_field('', 'destination_ip', $8); set_collected_field('', 'destination_port', $9); set_collected_field('', 'action', $10); set_collected_field('', 'rule', $11); accept_collected_entry('', false); ); else if (matches_regular_expression(v.syslog_message, '([0-9]+ [A-Z][a-z]+ [0-9]+ [0-9:]+) (\\([^)]+\\)) ([0-9.]+) ([^ ]+) Packet\\[*([^-]*)\\]* - Source:([0-9.]+),*([0-9]*)\\[*[^]]*\\]* ,[WL]AN - Destination:([0-9.]+),([0-9]*)\\[*[^]]*\\]* ,[WL]AN \\[([^]]+)\\] - \\[([^]]+)\\]\\^M *$')) then ( v.device_date_time = $1; set_collected_field('', 'device_name', substr($2, 1, length($2)-2)); set_collected_field('', 'device_ip', $3); set_collected_field('', 'operation', $4 . ' Packet ' . $5); set_collected_field('', 'source_ip', $6); set_collected_field('', 'source_port', $7); set_collected_field('', 'destination_ip', $8); set_collected_field('', 'destination_port', $9); set_collected_field('', 'action', $10); set_collected_field('', 'rule', $11); accept_collected_entry('', false); ); else if (matches_regular_expression(v.syslog_message, '([0-9]+ [A-Z][a-z]+ [0-9]+ [0-9:]+) (\\([^)]+\\)) ([0-9.]+) ([^ ]+) Packet\\[*([^-]*)\\]* - Source:([0-9.]+) - Destination:([0-9.]+) - \\[([^]]+)\\]\\^M *$')) then ( v.device_date_time = $1; set_collected_field('', 'device_name', substr($2, 1, length($2)-2)); set_collected_field('', 'device_ip', $3); set_collected_field('', 'operation', $4 . ' Packet ' . $5); set_collected_field('', 'source_ip', $6); set_collected_field('', 'destination_ip', $7); set_collected_field('', 'rule', $8); accept_collected_entry('', false); ); else if (matches_regular_expression(v.syslog_message, '([0-9]+ [A-Z][a-z]+ [0-9]+ [0-9:]+) (\\([^)]+\\)) ([0-9.]+) (Access site) - Source:([0-9.]+),[WL]AN - Destination:([^,]+),[WL]AN - \\[([^]]+)\\]\\^M *$')) then ( v.device_date_time = $1; set_collected_field('', 'device_name', substr($2, 1, length($2)-2)); set_collected_field('', 'device_ip', $3); set_collected_field('', 'operation', $4); set_collected_field('', 'source_ip', $5); set_collected_field('', 'destination_ip', $6); set_collected_field('', 'action', $7); accept_collected_entry('', false); ); ` # Database fields database.fields = { device_name = "" device_ip = "" operation = "" rule = "" action = "" source_ip = "" source_port = "" destination_ip = "" destination_port = "" } # 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 = 'packets = 1;' } # mark_entry } # log.filters database.numerical_fields = { packets = { default = true requires_log_field = false type = "int" display_format_type = "integer" entries_field = true } # packets 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 = { # How the reports should be grouped in the report menu report_groups = { date_time_group = "" } # report_groups } # create_profile_wizard_options } # net_gear_fvl328