# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. jataayu_carrier_wap_server = { plugin_version = "1.0" info.1.manufacturer = "Jataayu" info.1.device = "Carrier WAP Server" info.1.version = "4" # 2007-09-13 - 1.0 - KBB - initial creation # The name of the log format log.format.format_label = "Jataayu Carrier WAP Server (CWS) Log Format" log.miscellaneous.log_data_type = "network" log.miscellaneous.log_format_type = "network_device" # The log is in this format if any of the first ten lines match this regular expression #222.22.222.22|1626321625|13643|-|[28/AUG/2007:00:03:45]|"GET here.there.net:80/images/logo/80x13/header.wbmp"|CSD|1.2.1|SCO|404|0078|0|[NOKIA-RH-3P/V G101V0802.nep.0 UP.Browser/4.1.26l1.c.2.100]|application/vnd.wap.wmlc|NzQ2OTIy| log.format.autodetect_regular_expression = '^[0-9.]+\\|[0-9]+\\|[0-9]+\\|[^|]+\\|\\[[0-9]{2}/[A-Za-z]{3}/[0-9]{4}:[0-9]{2}:[0-9]{2}:[0-9]{2}\\]\\|"(GET|POST|CONNECT|GETNOTIFY) ' # Treat fields surrounded by square brackets (e.g. the date/time field) as a single quoted field. log.format.treat_brackets_as_quotes = "true" # CWS logs use | as the separator log.format.field_separator = "|" # The format of dates and times in this log log.format.date_format = "dd/mmm/yyyy" log.format.time_format = "hh:mm:ss" # Log fields log.fields = { date = "" time = "" client_ip = { type = "host" index = 1 } client_msisdn.index = 2 transaction_id.index = 3 cache.index = 4 tmp_date_time.index = 5 http_method = "" #http_method = { # index = 6 # subindex = 1 #} request_url = { type = "page" index = 6 # subindex = 2 } bearer.index = 7 version.index = 8 connection_type.index = 9 status.index = 10 response_bytes.index = 11 round_trip_time.index = 12 user_agent = { type = "agent" index = 13 } content_type.index = 14 session_id.index = 15 } # log.fields # Database fields database.fields = { date_time = "" day_of_week = "" hour_of_day = "" #domain_description = "" location = "" file_type = "" #worm = "" #screen_dimensions = "" #screen_depth = "" user_agent = "" web_browser = "" operating_system = "" client_ip = "" client_msisdn = "" transaction_id = "" cache = "" http_method = "" request_url = "" bearer = "" version = "" connection_type = "" status = "" content_type = "" session_id = "" #spider = "" } # database.fields # Log Parsing Filters log.parsing_filters.parse = ` # Get web browser, operating system, web browser, and #spider information from the user-agent field. get_user_agent_info(user_agent); web_browser = volatile.web_browser; operating_system = volatile.operating_system; #spider = volatile.spider; if (matches_regular_expression(tmp_date_time, '^([^:]+):(.*)$')) then ( date = $1; time = $2; ); if (matches_regular_expression(request_url, '^([^ ]+) (.*)$')) then ( http_method = $1; request_url = $2; ); ` # Log Filters log.filters = { remove_corrupted_entries = { label = "Remove corrupted entries." comment = 'Compensates for a problem where a very long query on a request_url results in a truncated line with no newline. Because the query is not terminated with " and because one line combines data from two or more lines, the data after the request_url is unreliable.' value = ` if ((session_id eq '(empty)') or contains(bearer, '/') or contains(bearer, '|')) then 'reject' ` } # remove_corrupted_entries # set_page_for_worm = { # label = "$lang_admin.log_filters.set_page_for_worm_label" # comment = "$lang_admin.log_filters.set_page_for_worm_comment" # value = "if (starts_with(worm, '(')) then '' else request_url = '(worm)';" # } # set_page_for_worm remove_query = { label = "$lang_admin.log_filters.remove_query_label" comment = "$lang_admin.log_filters.remove_query_comment" value = "if (contains(request_url, '?')) then request_url = substr(request_url, 0, index(request_url, '?') + 1) . '(parameters)';" } # remove_query detect_page_views = { label = '$lang_admin.log_filters.detect_page_views_label' comment = '$lang_admin.log_filters.detect_page_views_comment' value = "if ((file_type eq 'JPEG') or (file_type eq 'JPG') or (file_type eq 'GIF') or (file_type eq 'ICO') or (file_type eq 'PNG') or (file_type eq 'CSS') or (file_type eq 'SWF') or (file_type eq 'JS')) then page_views = 0; else page_views = 1;" } # detect_page_views strip_non_page_views = { label = '$lang_admin.log_filters.strip_non_page_views_label' comment = '$lang_admin.log_filters.strip_non_page_views_comment' value = "if (page_views == 0) then request_url = substr(request_url, 0, last_index(request_url, '/') + 1) . '(nonpage)';" } # strip_non_page_views server_responses = { value = "status = status . ' (' . node_value(subnode_by_name('lang_stats.log_formats.http_server_responses', status)) . ')';" disabled = "false" label = "Server Responses" comment = "This rewrites the server responses in plain text" } # server_responses mark_entry = { label = '$lang_admin.log_filters.mark_entry_label' comment = '$lang_admin.log_filters.mark_entry_comment' value = 'events = 1;' } # mark_entry } # log.filters log.field_options = { sessions_page_field = "request_url" sessions_visitor_id_field = "client_msisdn" sessions_event_field = "page_views" } # log.field_options database.numerical_fields = { events = { default = true requires_log_field = false entries_field = true } # events page_views = { default = true requires_log_field = false } # page_views visitors = { default = true log_field = "client_msisdn" type = "unique" } # visitors round_trip_time = { default = false type = "int" integer_bits = 64 display_format_type = "duration_compact" } # round_trip_time response_bytes = { default = false type = "int" integer_bits = 64 display_format_type = "bandwidth" } # response_bytes } # database.numerical_fields create_profile_wizard_options = { # How the reports should be grouped in the report menu report_groups = { date_time_group = "" client_group = { client_msisdn = true client_ip = true location = true user_agent = true web_browser = true operating_system = true } content_group = { http_method = true request_url = true content_type = true file_type = true } other_group = { connection_type = true status = true session_id = true bearer = true transaction_id = true version = true cache = true } } # report_groups } # create_profile_wizard_options } # jataayu_carrier_wap_server