# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. sa_wuftp = { plugin_version = "1.0" # Initial creation - 1.0 info.1.manufacturer = "Sawmill Analytics" info.1.device = "WU-FTP" info.1.version.1 = "" # The name of the log format log.format.format_label = "WU-FTP Log Format" log.miscellaneous.log_data_type = "ftp" log.miscellaneous.log_format_type = "ftp_server" # The follow data types are not supported for this format # 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] [0-9]* [^ ]* [0-9]* \"*[^\"]*\"* [a-z] _ [a-z] [a-z] [^ ]* ftp [0-9]* \\* *[a-z]*$" # This regular expression is used to parse the log fields out of the log entry log.format.parsing_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]) [0-9]* ([^ ]*) [0-9]* \"*([^\"]*)\"* ([a-z]) _ ([a-z]) [a-z] ([^ ]*) ([^ ]*) [0-9]* [^ ]* *([a-z]*)$" # The format of dates and times in this log log.format.date_format = "mmm dd hh:mm:ss yyyy" log.format.time_format = "mmm dd hh:mm:ss yyyy" # Log entries are called downloads statistics.miscellaneous.entry_name = "transfers" # Log fields log.fields = { date_time.type = "date_time" hostname.type = "host" page.type = "page" mode = "" direction = "" authenticated_user = "" protocol = "" complete = "" datestamp = "" title_status = "" date_file_loaded = "" folder_name = "" ti_name = "" product_id = "" author = "" title = "" subject = "" language = "" publisher = "" isbn = "" rights_restrictions = "" reading_level = "" warnings = "" synopsis = "" format = "" daisy = "" braille = "" comment = "" read_folders = "" upd_folders = "" } # log.fields # Database fields database.fields = { date_time = "" day_of_week = "" hour_of_day = "" page = { type = "string" suppress_top = 0 suppress_bottom = 9 display_format_type = "page" } # page file_type = "" hostname = "" domain_description = "" location = { type = "string" suppress_top = 0 suppress_bottom = 3 } # location authenticated_user = "" mode = "" direction = "" complete = "" datestamp = "" title_status = "" date_file_loaded = "" folder_name = "" ti_name = "" product_id = "" author = "" title = "" subject = "" language = "" publisher = "" isbn = "" rights_restrictions = "" reading_level = "" warnings = "" synopsis = "" format = "" daisy = "" braille = "" comment = "" read_folders = "" upd_folders = "" } # database.fields ## parsing filters ## this line: if it is read, it is a # get_date log.parsing_filters.get_date = { value = "datestamp = date_time;" } # get_meta log.parsing_filters.get_meta = { value = ` if (matches_regular_expression(authenticated_user, '^([^-]+)-([^$]+)$')) then ( v.user = $1; v.type = $2; ## get folder name for look up if (v.type eq 'upd') then ( if (matches_regular_expression(page, '^/([^/]+)/')) then ( v.folder_name = $1; upd_folders = replace_all(replace_all(v.folder_name, ',', '_'), ' ', '_') . '_' . v.type; ); ); else if (v.type eq 'read') then ( if (matches_regular_expression(page, '^/[^/]+/([^/]+)/')) then ( v.folder_name = $1; read_folders = replace_all(replace_all(v.folder_name, ',', '_'), ' ', '_') . '_' . v.type; ); ); ## do lookup node e = 'rewrite_rules.meta'; if (e?{v.folder_name}) then ( node v = e{v.folder_name}; title_status = @v{'title_status'}; date_file_loaded = @v{'date_file_loaded'}; folder_name = @v{'folder_name'}; ti_name = @v{'ti_name'}; product_id = @v{'product_id'}; author = @v{'author'}; title = @v{'title'}; subject = @v{'subject'}; language = @v{'language'}; publisher = @v{'publisher'}; isbn = @v{'isbn'}; rights_restrictions = @v{'rights_restrictions'}; daisy = @v{'daisy'}; ); # if folder name matches, use this record authenticated_user = v.user; ); # auth user matches else 'reject'; ` } # parsing filters # Log Filters log.filters = { not_authenticated = { label = "$lang_admin.log_filters.not_authenticated_label" comment = "$lang_admin.log_filters.not_authenticated_comment" value = "if (authenticated_user eq '-') then authenticated_user = 'not authenticated';" } # not_authenticated mark_entry = { label = '$lang_admin.log_filters.mark_entry_label' comment = '$lang_admin.log_filters.mark_entry_comment' value = "total_transfers = 1;" } # mark_entry } # log.filters log.field_options = { sessions_page_field = "" sessions_visitor_id_field = "" sessions_event_field = "" } # log.field_options database.numerical_fields = { total_transfers = { default = true requires_log_field = false #log_field = "folder_name" type = "int" display_format_type = "integer" entries_field = true } # total_transfers downloads = { default = true requires_log_field = true log_field = "read_folders" type = "unique" display_format_type = "integer" } # downloads uploads = { default = true requires_log_field = true log_field = "upd_folders" type = "unique" display_format_type = "integer" } # uploads visitors = { default = true requires_log_field = true log_field = "hostname" type = "unique" display_format_type = "integer" } # visitors } # database.numerical_fields create_profile_wizard_options = { # How the reports should be grouped in the report menu report_groups = { date_time_group = "" } # report_groups } # create_profile_wizard_options } # sa_wuftp