unix_syslog = { # Unix Syslog # The name of the log format log.format.format_label = "Unix Syslog" log.miscellaneous.log_data_type = "syslog" log.miscellaneous.log_format_type = "syslog_server" # The log is in this format if any of the first ten lines match this regular expression log.format.autodetect_regular_expression = "^<*[0-9X]*>*[A-Za-z][A-Za-z][A-Za-z] [0-9 ][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\\.*[0-9]* [^ ]* " # 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 = "auto" log.format.time_format = "auto" # Log fields log.fields = { date = { label = "$lang_stats.field_labels.date" type = "date" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # date time = { label = "$lang_stats.field_labels.time" type = "time" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # time logging_device = { label = "$lang_stats.field_labels.logging_device" type = "flat" index = 0 subindex = 0 } # logging_device log_level = { label = "$lang_stats.field_labels.log_level" type = "flat" index = 0 subindex = 0 } # log_level syslog_message = "" } # log.fields # # Log Parsing Filters log.parsing_filters = { year_from_filename = { label = "" comment = "" value = " if (matches_regular_expression(current_log_pathname(), '([0-9][0-9][0-9][0-9])\\\\.log')) then log.processing.default_log_date_year = $1; " disabled = false } # year_from_filename # Parse out the syslog fields syslog_1 = { label = "syslog_1" comment = "" value = ` v.syslog_message = ''; if (matches_regular_expression(current_log_line(), '^<*([0-9X]*)>*([A-Za-z][A-Za-z][A-Za-z] [0-9 ][0-9]) ([0-9][0-9]:[0-9][0-9]:[0-9][0-9])(.*)')) then ( set_collected_field('', 'log_level', $1); set_collected_field('', 'date', normalize_date($2, 'mmm dd')); set_collected_field('', 'time', $3); v.syslog_message = $4; if (matches_regular_expression(v.syslog_message, '^ ([^[ ]+) (.*)$')) then ( set_collected_field('', 'logging_device', $1); v.syslog_message = $2; ); # If this is a 'last message repeated' line, take the previous line and insert it into the log data stream that many times. if (matches_regular_expression(v.syslog_message, '^last message repeated ([0-9]+) times')) then ( for (int i = 0; i < $1; i++) ( set_subnode_value('volatile.log_line_insertions', i, v.last_log_line); ) ); # if last message repeated # If it's a normal line, extract it normally else ( while (starts_with(v.syslog_message, ' ')) v.syslog_message = substr(v.syslog_message, 1); if (matches_regular_expression(current_log_pathname(), '([0-1][0-9]-[0-3][0-9]-[21][09][0-9][0-9])')) then set_collected_field('', 'date', $1); # Remember the log line, in case we get a "last message repeated" line next v.last_log_line = current_log_line(); ); # if non-repeated line ); # it matches normal layout ` } # syslog_1 } # 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 logging_device = { label = "$lang_stats.field_labels.logging_device" log_field = "logging_device" type = "string" suppress_top = 0 suppress_bottom = 2 } # logging_device } # database.fields create_profile_wizard_options = { date_time_tracking = true # How the reports should be grouped in the report menu report_groups = { date_time_group = "" day_of_week = true hour_of_day = true logging_device = true } # report_groups } # create_profile_wizard_options } # unix_syslog