# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. syslog_ng = { plugin_version = "1.2" info.1.manfacturer = "BalaBit IT Security" info.1.device = "Syslog-NG" info.1.version.1 = "2" info.1.version.2 = "3" # 2010/09/09 - MSG - Added support for the following varation with just 4 fields: # 2010-09-08T00:00:00-04:00 10.9.1.2 # 2011/03/15 - 1.1 - gas - added support for Syslog-NG logging without syslog_priority # 2011/03/15 - 1.2 - gas - added info node # The name of the log format log.format.format_label = "Syslog NG Log Format" 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]T[0-9][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 syslog_message_type = { label = "$lang_stats.field_labels.syslog_message_type" type = "flat" index = 0 subindex = 0 } # syslog_message_type syslog_priority = { label = "$lang_stats.field_labels.syslog_priority" type = "flat" index = 0 subindex = 0 } # syslog_priority syslog_message = "" } # log.fields # # Log Parsing Filters log.parsing_filters = { syslog_parse = " v.syslog_message = ''; if (matches_regular_expression(current_log_line(), '^([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9])T([0-9][0-9]:[0-9][0-9]:[0-9][0-9])[-+][0-9][0-9]:*[0-9][0-9] <(.*)> ([^ ]+) (.*)$')) then ( set_collected_field('', 'date', $1); set_collected_field('', 'time', $2); set_collected_field('', 'syslog_message_type', $3); set_collected_field('', 'logging_device', $4); v.syslog_message = $5; ); ## 1.1 - gas - check for a log without priority, **must be here**, or at least before match with more fields else if (matches_regular_expression(current_log_line(), '^([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9])T([0-9][0-9]:[0-9][0-9]:[0-9][0-9])[-+][0-9][0-9]:*[0-9][0-9] ([^ ]+) ([^:]+): (.*)$')) then ( set_collected_field('', 'date', $1); set_collected_field('', 'time', $2); set_collected_field('', 'logging_device', $3); set_collected_field('', 'syslog_message_type', $4); # set_collected_field('', 'syslog_priority', $5); v.syslog_message = $5; ); else if (matches_regular_expression(current_log_line(), '^([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9])T([0-9][0-9]:[0-9][0-9]:[0-9][0-9])[-+][0-9][0-9]:*[0-9][0-9] ([^ ]+) ([^ ]+) ([^ ]+) (.*)$')) then ( set_collected_field('', 'date', $1); set_collected_field('', 'time', $2); set_collected_field('', 'logging_device', $3); set_collected_field('', 'syslog_message_type', $4); set_collected_field('', 'syslog_priority', $5); 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_message_type = { label = "$lang_stats.field_labels.syslog_message_type" log_field = "syslog_message_type" type = "string" suppress_top = 0 suppress_bottom = 2 } # syslog_message_type 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 create_profile_wizard_options = { # How the reports should be grouped in the report menu report_groups = { } # report_groups } # create_profile_wizard_options } # syslog_ng_test