# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. clavister_firewall_csv = { plugin_version = "1.0.1" # Initial creation - 1.0 # 2010-10-26 - 1.0.1 - MSG - Edited info lines. info.1.manfacturer = "Clavister" info.1.device = "Firewall (CSV)" info.1.version.1 = "" # The name of the log format log.format.format_label = "Clavister Firewall Log Format (CSV)" log.miscellaneous.log_data_type = "firewall" 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 = '^Time;Name;Rule;Severity;Category;Source;Destination;Protocol;Summary' # Parse with parsing filters, not CSV header log.format.parse_only_with_filters = true log.format.ignore_format_lines = "true" # The format of dates and times in this log log.format.date_format = "auto" log.format.time_format = "auto" log.fields = { date = { label = "$lang_stats.field_labels.date" type = "date" } # date time = { label = "$lang_stats.field_labels.time" type = "time" } # time name = { label = "$lang_stats.field_labels.name" type = "flat" } # name rule = { label = "$lang_stats.field_labels.rule" type = "flat" } # rule severity = { label = "$lang_stats.field_labels.severity" type = "flat" } # severity category = { label = "$lang_stats.field_labels.category" type = "flat" } # category source_ip = { label = "$lang_stats.field_labels.source_ip" type = "host" hierarchy_dividers = "." left_to_right = false leading_divider = "false" } # source_ip source_port = { label = "$lang_stats.field_labels.source_port" type = "flat" } # source_port destination_ip = { label = "$lang_stats.field_labels.destination_ip" type = "flat" } # destination_ip destination_port = { label = "$lang_stats.field_labels.destination_port" type = "flat" } # destination_port protocol = { label = "$lang_stats.field_labels.protocol" type = "flat" } # protocol summary = { label = "$lang_stats.field_labels.summary" type = "flat" } # summary } # log.fields # # Log Parsing Filters log.parsing_filters = { # Parse each line parse = { label = "parse" comment = "" value = " if (matches_regular_expression(current_log_line(), '^([0-9-]+) ([0-9:]+);([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);([^;]+)')) then ( set_collected_field('', 'date', $1); set_collected_field('', 'time', $2); set_collected_field('', 'name', $3); set_collected_field('', 'rule', $4); set_collected_field('', 'severity', $5); set_collected_field('', 'category', $6); set_collected_field('', 'protocol', $1); v.source = $7; v.destination = $8; set_collected_field('', 'protocol', $9); set_collected_field('', 'summary', $10); # Extract IP and port from source if (matches_regular_expression(v.source, '^(.*):(.*)$')) then ( set_collected_field('', 'source_ip', $1); set_collected_field('', 'source_port', $2); ) else ( set_collected_field('', 'source_ip', v.source); ); # Extract IP and port from destination if (matches_regular_expression(v.destination, '^(.*):(.*)$')) then ( set_collected_field('', 'destination_ip', $1); set_collected_field('', 'destination_port', $2); ) else ( set_collected_field('', 'destination_ip', v.destination); ); accept_collected_entry('', false); ) " } # parse } # 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 name = { label = "$lang_stats.field_labels.name" log_field = "name" type = "string" } # name rule = { label = "$lang_stats.field_labels.rule" log_field = "rule" type = "string" } # rule severity = { label = "$lang_stats.field_labels.severity" log_field = "severity" type = "string" } # severity category = { label = "$lang_stats.field_labels.category" log_field = "category" type = "string" } # category source_ip = { label = "$lang_stats.field_labels.source_ip" log_field = "source_ip" type = "string" display_format_type = "hostname" } # source_ip location = { label = "$lang_stats.field_labels.location" log_field = "location" type = "string" suppress_top = 0 suppress_bottom = 3 } # location source_port = { label = "$lang_stats.field_labels.source_port" log_field = "source_port" type = "string" } # source_port destination_ip = { label = "$lang_stats.field_labels.destination_ip" log_field = "destination_ip" type = "string" } # destination_ip destination_port = { label = "$lang_stats.field_labels.destination_port" log_field = "destination_port" type = "string" } # destination_port protocol = { label = "$lang_stats.field_labels.protocol" log_field = "protocol" type = "string" } # protocol summary = { label = "$lang_stats.field_labels.summary" log_field = "summary" type = "string" } # summary } # database.fields database.numerical_fields = { accesses = { label = "$lang_stats.field_labels.accesses" default = true requires_log_field = false type = "int" display_format_type = "integer" entries_field = true } # accesses } # database.numerical_fields log.filters = { mark_entry = { label = '$lang_admin.log_filters.mark_entry_label' comment = '$lang_admin.log_filters.mark_entry_comment' value = 'accesses = 1;' } # mark_entry } # log.filters 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 = "" name = true rule = true severity = true category = true source_ip = true location = true source_port = true destination_ip = true destination_port = true protocol = true summary = true } # report_groups } # create_profile_wizard_options not_supported = { sessions = true pageviews = true visitors = true bandwidth = true } # not_supported } # clavister_firewall_csv