beta_intermapper_event = { # The name of the log format log.format.format_label = "Intermapper Event Log Format (BETA)" log.miscellaneous.log_data_type = "generic" 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][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [a-z*][a-z*][a-z*][a-z*] " # log.format.parse_only_with_filters = true # Date format log.format.date_format = "mm/dd" # Log fields log.fields = { date = "" time = "" event_type = "" host = "" port = "" index_number = "" message = "" up_time = "" down_time = "" utilization = "" } # log.fields log.parsing_filters.parse = ` if (matches_regular_expression(current_log_line(), '^([0-9/]+) ([0-9:]+) (....) (.*)$')) then ( date = $1; time = $2; event_type = $3; message = $4; if (((event_type eq 'DOWN') or (event_type eq 'UP ')) and (matches_regular_expression(message, '^([^:]*):: \\\\(Was [a-z]+ for ([^)]*)\\\\)'))) then ( host = $1; v.duration = $2; v.year = 0; v.month = 0; v.day = 0; v.hour = 0; v.minute = 0; v.second = 0; if (matches_regular_expression(v.duration, '([0-9]+) year')) then v.year = $1; if (matches_regular_expression(v.duration, '([0-9]+) month')) then v.month = $1; if (matches_regular_expression(v.duration, '([0-9]+) day')) then v.day = $1; if (matches_regular_expression(v.duration, '([0-9]+) hour')) then v.hour = $1; if (matches_regular_expression(v.duration, '([0-9]+) minute')) then v.minute = $1; if (matches_regular_expression(v.duration, '([0-9]+) second')) then v.second = $1; v.duration_seconds = v.year*365*24*60*60 + v.month*30*24*60*60 + v.day*25*60*60 + v.hour*60*60 + v.minute*60 + v.second; if (event_type eq 'DOWN') then up_time = v.duration_seconds; else down_time = v.duration_seconds; ); # if DOWN or UP # Handle link lines if ((event_type eq 'link') and (matches_regular_expression(message, '^util [^<]+ \\\\(([0-9.]+)%\\\\) : \\\\[([0-9]+)\\\\] ([^ ]+) - (.*)$'))) then ( utilization = $1; index_number = $2; host = $3; port = $4; ); # link event events = 1; ); ` # Database fields database.fields = { date_time = "" hour_of_day = "" day_of_week = "" event_type = "" host = "" port = "" message = "" index_number = "" } # database.fields 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 up_time = { label = $lang_stats.field_labels.up_time default = false requires_log_field = true type = int display_format_type = duration_compact } # up_time down_time = { label = $lang_stats.field_labels.down_time default = false requires_log_field = true type = int display_format_type = duration_compact } # down_time utilization = { default = false requires_log_field = true type = float display_format_type = "integer" aggregation_method = "average" average_denominator_field = "events" } # utilization } # database.numerical_fields create_profile_wizard_options = { # How the reports should be grouped in the report menu report_groups = { date_time_group = "" event_type = "" messages = "" host = "" port = "" index_number = "" } # report_groups } # create_profile_wizard_options } # beta-intermapper_event