iptraf = { plugin_version = "1.0.2" # 2009-04-07 : 1.0 : gas : Added support for variant with single digit days # 2010-06-02 : 1.0.1 : saa : Added support for variant with single digit days with two spaces, # 2010-06-02 : 1.0.1 : saa : (...continuing), changed log.format.date_format to "auto" # 2010-06-02 : 1.0.1 : saa : (...continuing), changed the ([0-9]*) for date format in the parse expression to ([0-9]+) # 2010-06-02 : 1.0.1 : saa : (...continuing), changed the three ([^:]+) for time format in the parse expression to ([0-9]+) # 2011-02-22 - 1.0.2 - MSG - Edited info lines. info.1.manfacturer = "GNU" info.1.device = "IPTraf" info.1.version.1 = "" # The name of the log format log.format.format_label = "IPTraf Log Format" log.miscellaneous.log_data_type = "firewall" 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 = "^[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9 ]*[0-9] [0-9 ][0-9]:[0-9][0-9]:[0-9][0-9] [0-9][0-9][0-9][0-9]; [A-Z]*; [^;]*; [0-9]* bytes;" # All log field parsing will be done using the parsing filters log.format.parse_only_with_filters = "true" # The format of dates and times in this log # log.format.date_format = "yyyy/mmm/dd" log.format.date_format = "auto" log.format.time_format = "auto" # Log fields log.fields = { date_time = { label = "$lang_stats.field_labels.date_time" type = "date_time" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # date_time protocol = { label = "$lang_stats.field_labels.protocol" type = "flat" index = 0 subindex = 0 } # protocol interface = { label = "$lang_stats.field_labels.interface" type = "flat" index = 0 subindex = 0 } # interface source_mac_address = { label = "$lang_stats.field_labels.source_mac_address" type = "flat" index = 0 subindex = 0 } # source_mac_address type = { label = "$lang_stats.field_labels.type" type = "flat" index = 0 subindex = 0 } # type bytes_transferred = { label = "$lang_stats.field_labels.bytes_transferred" type = "size" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # bytes_transferred source_ip = { label = "$lang_stats.field_labels.source_ip" type = "hierarchical" index = 0 subindex = 0 hierarchy_dividers = ":" left_to_right = true leading_divider = "false" } # source_ip source_port = { label = "$lang_stats.field_labels.source_port" type = "flat" index = 0 subindex = 0 } # source_port destination_ip = { label = "$lang_stats.field_labels.destination_ip" type = "hierarchical" index = 0 subindex = 0 hierarchy_dividers = ":" left_to_right = true leading_divider = "false" } # destination_ip destination_port = { label = "$lang_stats.field_labels.destination_port" type = "flat" index = 0 subindex = 0 } # destination_port } # log.fields # # Log Parsing Filters log.parsing_filters = { # Parse out the date, protocol, interface, and size 10 = { label = "1" comment = "" value = `if (matches_regular_expression(current_log_line(), '^[A-Z][a-z][a-z] ([A-Z][a-z][a-z]) +([0-9]+) ([0-9]+:[0-9]+:[0-9]+) ([0-9]+); ([A-Z]+); ([^;]+); ([0-9]+) bytes;')) then ( v.day = $2; if (length(v.day) < 2) then v.day = '0' . v.day; set_collected_field('', 'date', $4 . '/' . $1 . '/' . v.day); set_collected_field('', 'time', $3); set_collected_field('', 'protocol', $5); set_collected_field('', 'interface', $6); set_collected_field('', 'bytes_transferred', $7); );` } # 1 # Parse out the source MAC address 20 = { label = "2" comment = "" value = "collect_fields_using_regexp('()source MAC address ([^;]+);', '*KEY*,source_mac_address')" } # 2 # Parse out source IP, source port, destination IP, destination port 30 = { label = "3" comment = "" value = "collect_fields_using_regexp('() from ([^:]*):([^ ]*) to ([^:]*):([^;]*)', '*KEY*,source_ip,source_port,destination_ip,destination_port')" } # 3 # Parse out source IP, destination IP 40 = { label = "4" comment = "" value = "collect_fields_using_regexp('() from ([^:]+) to ([^:]+)', '*KEY*,source_ip,destination_ip')" } # 4 # Parse a line with just a type 50 = { label = "5" comment = "" value = "collect_fields_using_regexp('() to [^:]*:*[^;]*[; ]([^;]*)$', '*KEY*,type')" } # 5 # Parse a line with a type and sizes 60 = { label = "6" comment = "" value = "collect_fields_using_regexp('() to [^:]*:[^;]*; ([^;]*); [0-9]* packets, ([0-9]*) bytes', '*KEY*,type,bytes_transferred')" } # 6 # Accept this line 70 = { label = "7" comment = "" value = "accept_collected_entry_using_regexp('^()', false)" } # 7 } # 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 protocol = { label = "$lang_stats.field_labels.protocol" log_field = "protocol" type = "string" suppress_top = 0 suppress_bottom = 2 } # protocol interface = { label = "$lang_stats.field_labels.interface" log_field = "interface" type = "string" suppress_top = 0 suppress_bottom = 2 } # interface type = { label = "$lang_stats.field_labels.type" log_field = "type" type = "string" suppress_top = 0 suppress_bottom = 2 } # type source_mac_address = { label = "$lang_stats.field_labels.source_mac_address" log_field = "source_mac_address" type = "string" suppress_top = 0 suppress_bottom = 2 } # source_mac_address 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 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 } # 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 = 'hits = 1;' } # mark_entry } # log.filters database.numerical_fields = { hits = { label = "$lang_stats.field_labels.hits" default = true requires_log_field = false type = "int" display_format_type = "integer" entries_field = true } # hits bytes_transferred = { label = "$lang_stats.field_labels.bytes_transferred" default = false requires_log_field = true log_field = "bytes_transferred" type = "float" display_format_type = "bandwidth" } # bytes_transferred } # database.numerical_fields create_profile_wizard_options = { date_time_tracking = true # How the reports should be grouped in the report menu report_groups = { date_time_group = "" protocol = true interface = true type = true source_mac_address = true source_ip = true source_port = true destination_ip = true destination_port = true } # report_groups } # create_profile_wizard_options not_supported = { visitors = true sessions = true pageviews = true } # not_supported } # iptraf