# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. mikrotik_router = { plugin_version = "1.0.1" # Initial creation - 1.0 # 2011-06-24 - 1.0.1 - MSG - Edited info lines. info.1.manufacturer = "MikroTik" info.1.device = "Router" info.1.version.1 = "" # The name of the log format log.format.format_label = "Mikrotik Router Log Format" 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 = "[a-z]+->[A-Z]+, [a-z]+:[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]+, len [0-9]+" # Log fields log.fields = { type = "" source_interface = "" destination_interface = "" protocol = "" source_ip.type = "host" source_port = "" destination_ip = "" destination_port = "" length = "" } # log.fields log.parsing_filters.parse = ` if (matches_regular_expression(v.syslog_message, '^([a-z]+->[A-Z]+), ([a-z]+:[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]+), len ([0-9]+)')) then ( set_collected_field('', 'type', $1); set_collected_field('', 'source_interface', $2); set_collected_field('', 'destination_interface', $3); set_collected_field('', 'protocol', $4); set_collected_field('', 'source_ip', $5); set_collected_field('', 'source_port', $6); set_collected_field('', 'destination_ip', $7); set_collected_field('', 'destination_port', $8); set_collected_field('', 'length', $9); accept_collected_entry('', false); ) ` # Database fields database.fields = { type = "" source_interface = "" destination_interface = "" protocol = "" source_ip = "" location = "" 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 = { label = "$lang_stats.field_labels.packets" default = true requires_log_field = false type = "int" display_format_type = "integer" entries_field = true } # packets unique_source_ips = { label = "$lang_stats.field_labels.unique_source_ips" default = false requires_log_field = true log_field = "source_ip" type = "unique" display_format_type = "integer" } # unique_source_ips length = { label = "$lang_stats.field_labels.length" default = false requires_log_field = true log_field = "length" type = "int" integer_bits = 64 display_format_type = "bandwidth" } # length } # database.numerical_fields create_profile_wizard_options = { host_tracking = true # How the reports should be grouped in the report menu report_groups = { date_time_group = "" type = true source_interface = true destination_interface = true protocol = true source_ip = true location = true source_port = true destination_ip = true destination_port = true } # report_groups } # create_profile_wizard_options } # mikrotik_router