# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. apache_error_syslog_required = { plugin_version = "1.0.1" info.1.manfacturer = "Apache" info.1.device = "Error (syslog required)" info.1.version.1 = "" # 2008-07-14 - 1.0 - KBB - Initial creation, from apache_error.cfg. (I didn't make # apache_error.cfg a syslog_required plug-in since logging Apache with syslog is not common.) # 2010-10-11 - 1.0.1 - MSG - Edited info lines. # The name of the log format log.format.format_label = "Apache Error Log Format (syslog required)" log.miscellaneous.log_data_type = "syslog_required" log.miscellaneous.log_format_type = "web_server" # The log is in this format if any of the first ten lines match this regular expression log.format.autodetect_regular_expression = "\\[[A-Z][a-z][a-z] [A-Z][a-z][a-z] [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-z]*\\] \\[client [^]]*\\] " # All log field parsing will be done using the parsing filters log.format.parse_only_with_filters = "true" # Log fields log.fields = { date_time = "" type = "" hostname.type = "host" error_message = "" } # log.fields # Log Parsing Filters log.parsing_filters.parse = ` if (matches_regular_expression(v.syslog_message, '^\\\\[[A-Z][a-z][a-z] ([A-Z][a-z][a-z] [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-z]*)\\\\] \\\\[client ([^]]*)\\\\] (.*)$')) then ( set_collected_field('', 'date_time', $1); set_collected_field('', 'type', $2); set_collected_field('', 'hostname', $3); set_collected_field('', 'error_message', $4); accept_collected_entry('', false); ); ` # Database fields database.fields = { date_time = "" day_of_week = "" hour_of_day = "" type = "" hostname = "" domain_description = "" location = "" error_message = "" } # database.fields database.numerical_fields = { hits = { default = true requires_log_field = false entries_field = true } # hits } # database.numerical_fields log.filters = { mark_entry = { label = '$lang_admin.log_filters.mark_entry_label' comment = '$lang_admin.log_filters.mark_entry_comment' value = 'hits = 1;' } # mark_entry } # log.filters create_profile_wizard_options = { # How the reports should be grouped in the report menu report_groups = { date_time_group = "" type = true hostname = true domain_description = true location = true error_message = true } # report_groups } # create_profile_wizard_options } # apache_error_syslog_required