# Copyright (c) 2013 Flowerfire, Inc. All Rights Reserved. syslog_watcher = { plugin_version = "1.0.1" # 2013-08-27 - 1.0 - GMF - Initial creation # 2013-09-25 - 1.0.1 - GMF - Added support for one-digit months info.1.manufacturer = "SnmpSoft" info.1.device = "Syslog Watcher" info.1.version.1 = "" # The name of the log format log.format.format_label = "SnmpSoft Syslog Watcher" 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] [AP]M,[^,]+,[0-9.a-f:]+,[(][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][)] " # All log field parsing will be done using the parsing filters log.format.parse_only_with_filters = "true" log.format.ignore_format_lines = "true" # Log fields log.fields = { date = "" time = "" syslog_priority = "" 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]) ([0-9]+:[0-9][0-9] [AP]M),([^,]+),([0-9.a-f:]+),(.*)$")) then ( set_collected_field('', 'date', $1); set_collected_field('', 'time', $2); set_collected_field('', 'syslog_priority', $3); set_collected_field('', 'logging_device', $4); v.syslog_message = $5; ); ` } # log.parsing_filters # Database fields database.fields = { date_time = "" day_of_week = "" hour_of_day = "" logging_device = "" syslog_priority = "" } # database.fields } # syslog_watcher