# Copyright (c) 2014 Flowerfire, Inc. All Rights Reserved. logstorm_syslog = { plugin_version = "1.0" # 2014-05-22 - GMF - Initial creation info.1.manufacturer = "BlackStratus" info.1.device = "LogStorm Syslog" info.1.version.1 = "" # The name of the log format log.format.format_label = "BlackStratus LogStorm 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-9][0-9]:[0-9][0-9][.][0-9],[0-9.a-f:]+,(.*)$" # All log field parsing will be done using the parsing filters log.format.parse_only_with_filters = "true" log.format.ignore_format_lines = "true" #### STOPPED WORK HERE # Log fields log.fields = { date = "" time = "" 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][0-9]:[0-9][0-9])[.][0-9],([0-9.a-f:]+),(.*)$")) then ( set_collected_field('', 'time', $1 . ":00"); set_collected_field('', 'date', substr(epoc_to_date_time(now()), 0, 11)); set_collected_field('', 'logging_device', $2); v.syslog_message = $3; ); ` } # log.parsing_filters # Database fields database.fields = { date_time = "" day_of_week = "" hour_of_day = "" logging_device = "" } # database.fields } # logstorm_syslog