# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. blue_coat_im = { # 2010-10-01 - 1.0.1 - MSG - Edited info lines info.1.manufacturer = "Bluecoat" info.1.device = "Instant Messenger" info.1.version = "" # The name of the log format log.format.format_label = "Blue Coat Instant Messenger Log Format" log.miscellaneous.log_data_type = generic_w3c log.miscellaneous.log_format_type = "other" # The log is in this format if any of the first ten lines match this regular expression log.format.autodetect_regular_expression = "^#Fields: .*x-im-" # The format of dates and times in this log log.format.date_format = yyyy-mm-dd log.format.time_format = hh:mm:ss statistics.miscellaneous.entry_name = message # Literal apostrophes can appear in field values, and should not be treated as quotes log.format.treat_apostrophes_as_quotes = false # Set the default session timeout to 240 statistics.miscellaneous.maximum_session_duration = 0 statistics.miscellaneous.session_timeout = 240 # Log Filters log.filters = { # Reject all methods we don't care about reject_nonmessage = { label = "Reject non-messages" value = "if ((x_im_method eq 'NOTIFY_STATE') or (x_im_method eq 'SET_STATE') or (x_im_method eq 'LOGIN') or (x_im_method eq 'LOGOUT') or (x_im_method eq 'OPEN') or (x_im_method eq 'UNKNOWN_SEND') or (x_im_method eq 'UNKNOWN_RECEIVE')) then 'reject';" } # reject_nonmessage # Reject "has started typing" and entries reject_hst = { label = "Reject Has Started Typing" value = "if (ends_with(x_im_message_text, ' has started typing') or ends_with(x_im_message_text, ' has stopped typing')) then 'reject';" } # reject_hst # populate user pairs user_pairs = { label = "Create Buddy Pairs" value = "im_user_pairs = x_im_user_id . ' %E2%86%94 ' . x_im_buddy_id;" } # user_pairs # populate to_from database field to_from = { label = "Local buddy to Remote buddy" value = "if (x_im_method eq 'SEND') then (to_from = x_im_user_id . ' %E2%86%92 ' . x_im_buddy_id);" } # to_from from_to = { label = "Remote buddy to Local buddy" value = "if (x_im_method eq 'RECEIVE') then (to_from = x_im_buddy_id . ' %E2%86%92 ' . x_im_user_id);" } # from_to # Remove any HTML tags from the message strip_html = { label = "Strip HTML Tags" value = "if (index(x_im_message_text, '<') != -1) then ( bool in_tag = false; string converted_message; int i; string c; for (i = 0; i < length(x_im_message_text); i++) ( c = substr(x_im_message_text, i, 1); if (c eq '<') then in_tag = true; if (!in_tag) then converted_message .= c; if (c eq '>') then in_tag = false; ); x_im_message_text = converted_message;)" } # strip_html # Set the visitor id to the authenticated username, if there is one; otherwise use the IM user ID. # 4 = "if (x_im_user_id eq '-') then visitor_id = authenticated_username; else visitor_id = x_im_user_id;" # Mark this as a message mark_message = { label = "Mark as a message" value = "messages = 1;" } # mark_message } # log.filters log.field_options = { sessions_event_field = "messages" sessions_visitor_id_field = "im_user_pairs" sessions_page_field = "x_im_message_text" } # Add to_from fields log.fields.to_from = { type = "flat" label = "to_from" index = 999 subindex = 999 hierarchy_dividers = "" left_to_right_hierarchy = "false" leading_divider = "false" case_sensitive = "false" } # to_from database.fields.to_from = { label = "to_from" type = "string" log_field = "to_from" suppress_top = 0 suppress_bottom = 2 always_include_leaves = "false" } # to_from log.fields.im_user_pairs = { type = "flat" label = "im_user_pairs" index = 999 subindex = 999 hierarchy_dividers = "" left_to_right_hierarchy = "false" leading_divider = "false" case_sensitive = "false" } # im_user_pairs database.fields.im_user_pairs = { label = "im_user_pairs" type = "string" log_field = "im_user_pairs" suppress_top = 0 suppress_bottom = 2 always_include_leaves = "false" } # im_user_pairs database.numerical_fields = { messages = { label = $lang_stats.field_labels.messages default = true requires_log_field = false type = int display_format_type = integer entries_field = true } # messages x_im_message_size = { label = $lang_stats.field_labels.x_im_message_size default = false requires_log_field = true type = float display_format_type = bandwidth } # x_im_message_size x_im_file_size = { label = $lang_stats.field_labels.x_im_file_size default = false requires_log_field = true type = float display_format_type = bandwidth } # x_im_file_size # visitors = { # label = $lang_stats.field_labels.visitors # default = false # requires_log_field = true # log_field = authenticated_username # type = unique # display_format_type = integer # } # visitors } # database.numerical_fields create_profile_wizard_options = { date_time_tracking = true ######### START OF FINAL_STEP CODE final_step = ` include "templates.admin.profiles.setup_reports_util"; # Start with the standard reports string profile = "profiles." . volatile.new_profile_name; add_standard_reports(profile); ## ## CREATE THE CHAT DETAIL REPORT ## # Add the basic report string report_name = "chat_detail"; string report_element_name = "chat_detail"; add_simple_report_element(profile, report_name, "$lang_stats.menu.reports.chat_detail", report_element_name, "$lang_stats.menu.reports.chat_detail", "log_detail", "$lang_stats.menu.reports.chat_detail"); # Get the full report nodename string reports = profile . ".statistics.reports"; string report = reports . "." . report_name; string report_element = report . ".report_elements." . report_name; # Set the table options # Get the report and report_element nodes node report = profile . ".statistics.reports." . report_name; node report_element = report . ".report_elements." . report_element_name; set_report_element_variable(profile, report_element, "sort_by", ""); set_report_element_variable(profile, report_element, "show_omitted_items_row", "false"); set_report_element_variable(profile, report_element, "show_totals_row", "false"); set_report_element_variable(profile, report_element, "starting_row", 0); set_report_element_variable(profile, report_element, "ending_row", 50); set_report_element_variable(profile, report_element, "show_graph", "false"); # Add the columns of the chat detail report add_nonnumerical_column_to_table(profile, report_element, "0", "date_time"); add_nonnumerical_column_to_table(profile, report_element, "1", "cs_username"); add_nonnumerical_column_to_table(profile, report_element, "2", "to_from"); add_nonnumerical_column_to_table(profile, report_element, "3", "x_im_message_text"); # make the client IP fields flat (profile . ".database.fields.c_ip.suppress_top") = 99; (profile . ".database.fields.c_ip.suppress_bottom") = 99; add_table_report_element(profile, "users", "IM Users", "users", "IM Users", "x_im_user_id", "x_im_buddy_id", "messages", "messages", "descending", "false"); debug_message("3\\n"); ` ######### END OF FINAL_STEP CODE report_groups = { traffic_group = "" content_group = { x_im_message_text = true x_im_file_path = true } users_group = { users = true cs_username = true im_user_pairs = false x_im_user_id = false x_im_user_state = false x_im_buddy_id = false x_im_buddy_state = false c_ip = true domain_description = false location = false to_from = false } chat_room_group = { x_im_chat_room_id = true x_im_chat_room_type = true x_im_chat_room_members = true } technical_group = { x_im_user_name = true x_im_buddy_name = true cs_protocol = true x_im_method = true x_im_message_route = true x_im_message_type = true x_im_client_info = true s_action = true } # sessions_group = "" # log_detail = "" } # reports_menu } # create_profile_wizard_options not_supported = { sessionpages = true pageviews = true } # not_supported } # blue_coat_im