# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. kiwi_mmddyyyy = { plugin_version = "1.4" info.1.manufacturer = "SolarWinds" info.1.device = "Syslog Daemon (mm-dd-yyyy dates)" info.1.version.1 = "" info.2.manufacturer = "Kiwi" info.2.device = "Syslog Daemon (mm-dd-yyyy dates)" info.2.version.1 = "" # ????-??-?? - 1.0 - - Initial creation. # 2008-08-21 - 1.1 - KBB - Added support for a date/time variation with single digit month/day, # / instead of -, space instead of tab between date and time, and no seconds on time. # 2009-09-25 - 1.2 - gas - added support for single digit times and dot for time separator # 2010-02-19 - 1.3 - KBB - Prevent auto detection of logs that should only auto detect as Kiwi ISO. # Did this by restoring enforcement of a four digit year which was lost in the previous change. # 2010-04-07 - 1.4 - KBB - Fixed parsing to support single digit times and dot for separator. # 2011-07-28 - 1.0.1 - MSG - Edited info lines. # The name of the log format log.format.format_label = "Kiwi (mm-dd-yyyy dates)" 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-9][0-9]-[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-Za-z0-9.]+ [A-Za-z0-9.]+" #log.format.autodetect_regular_expression = "^[0-9]{1,2}[-/][0-9]{1,2}[-/][0-9]{4}[ ][0-9][0-9]:[0-9][0-9](:[0-9][0-9])? [A-Za-z0-9.]+ [A-Za-z0-9.]+" #log.format.autodetect_regular_expression = "^[0-9]+[-/][0-9]+[-/][0-9]+[ ][0-9]+[:.][0-9]+([:.][0-9]+)? [A-Za-z0-9.]+ [A-Za-z0-9.]+" # Don't detect this one: #2006-12-22 00:06:29 Local3.Error 192.168.11.11 (message part) # Detect these: #21-04-2003 17:45:04 Local0.Warning 155.155.155.255 (message part) #7/8/2008 0:00 Local0.Info 16.166.166.16 (message part) log.format.autodetect_regular_expression = "^[0-9]{1,2}[-/][0-9]{1,2}[-/][0-9]{4}[ ][0-9]+[:.][0-9]+([:.][0-9]+)? [A-Za-z0-9.]+ [A-Za-z0-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.format.ignore_format_lines = "true" # 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 syslog_priority = { label = "$lang_stats.field_labels.syslog_priority" type = "flat" index = 0 subindex = 0 } # syslog_priority logging_device = { label = "$lang_stats.field_labels.logging_device" type = "flat" index = 0 subindex = 0 } # logging_device syslog_message = "" } # log.fields # # Log Parsing Filters log.parsing_filters = { syslog_parse = " v.syslog_message = ''; if (matches_regular_expression(current_log_line(), '^([0-9]{1,2}[-/][0-9]{1,2}[-/][0-9]{4})[ ]([0-9]{1,2}[:.][0-9][0-9]([:.][0-9][0-9])?) ([A-Za-z0-9.]+) ([A-Za-z0-9.]+) (.*)$')) then ( set_collected_field('', 'date', $1); set_collected_field('', 'time', $2); # Remember $4 and $5. We don't know which is the syslog_priority and which is the # logging_device--it can be either way--so use a regular expression to differentiate. v.param3 = $4; v.param4 = $5; if (matches_regular_expression(v.param3, '^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$')) then ( set_collected_field('', 'syslog_priority', v.param4); set_collected_field('', 'logging_device', v.param3); ) else ( set_collected_field('', 'syslog_priority', v.param3); set_collected_field('', 'logging_device', v.param4); ); v.syslog_message = $6; ); " } # 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 syslog_priority = { label = "$lang_stats.field_labels.syslog_priority" log_field = "syslog_priority" type = "string" suppress_top = 0 suppress_bottom = 2 } # syslog_priority } # database.fields log.filters = { mark_entry = { label = '$lang_admin.log_filters.mark_entry_label' comment = '$lang_admin.log_filters.mark_entry_comment' value = 'hits = 1;page_views = 1;' } # mark_entry } # log.filters create_profile_wizard_options = { date_time_tracking = true # How the reports should be grouped in the report menu report_groups = { date_time_group = "" logging_device = true syslog_priority = true } # report_groups } # create_profile_wizard_options not_supported = { } # not_supported } # kiwi_mmddyyyy