# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. radius_accounting = { plugin_version = "1.2.1" # 2006-04-07: 1.1: Added maximum connections -GMF # 2006-04-14: 1.2: Improved maximum connection algorithm to use node -GMF # 2011-07-13 - 1.2.1 - MSG - Edited info lines. info.1.manufacturer = "Livingston" info.1.device = "Radius Accounting" info.1.version.1 = "" # The name of the log format log.format.format_label = "Radius Accounting Log Format" log.miscellaneous.log_data_type = "csv" log.miscellaneous.log_format_type = "network_device" # The log is in this format if any of the first ten lines match this regular expression log.format.autodetect_regular_expression = "Date,Time,User-Name,Group-Name,Class,Calling-Station-Id,Acct-Status-Type,Acct-Session-Id," # Use , as the separator log.format.field_separator = "," log.fields = { current_connections = "" } log.filter_initialization = ` #int running_current_connections = 0; v.logged_in_users = ""; node logged_in_users = 'v.logged_in_users'; node logged_in_user; int lines_since_last_timeout_check = 0; ` log.parsing_filters.parse = ` # If it's a login, add this username to the node if (acct_status_type eq "Start") then ( set_subnode_value(logged_in_users, user_name, now()); ); # If it's a logout, remove this username from the node else if (acct_status_type eq "Stop") then ( if (subnode_exists(logged_in_users, user_name)) then delete_node(subnode_by_name(logged_in_users, user_name)); ); # The number of connection is the number of logged in users current_connections = num_subnodes(logged_in_users); # Periodically time out anyone who hasn't logged out lines_since_last_timeout_check++; if (lines_since_last_timeout_check > 1000) then ( int nowtime = now(); foreach logged_in_user logged_in_users ( if (nowtime - node_value(logged_in_user) > 3600) then ( delete_node(logged_in_user); ); ); lines_since_last_timeout_check = 0; ); ` database.numerical_fields = { maximum_connections = { log_field = "current_connections" requires_log_field = false aggregation_method = "max" } events = { label = "$lang_stats.field_labels.events" default = true requires_log_field = false type = "int" display_format_type = "integer" entries_field = true } # events acct_input_octets = { label = "$lang_stats.field_labels.acct_input_octets" default = false requires_log_field = true log_field = "acct_input_octets" type = "int" integer_bits = 64 display_format_type = "bandwidth" } # acct_input_octets acct_output_octets = { label = "$lang_stats.field_labels.acct_output_octets" default = false requires_log_field = true log_field = "acct_output_octets" type = "int" integer_bits = 64 display_format_type = "bandwidth" } # acct_output_octets acct_input_packets = { label = "$lang_stats.field_labels.acct_input_packets" default = false requires_log_field = true log_field = "acct_input_packets" type = "int" display_format_type = "integer" } # acct_input_packets acct_output_packets = { label = "$lang_stats.field_labels.acct_output_packets" default = false requires_log_field = true log_field = "acct_output_packets" type = "int" display_format_type = "integer" } # acct_output_packets # current_connections = { # requires_log_field = false # } } # database.numerical_fields log.filters = { 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 create_profile_wizard_options = { date_time_tracking = true # How the reports should be grouped in the report menu report_groups = { date_time_group = "" timeras_client = true user_name = true group_name = true calling_station_id = true acct_status_type = true service_type = true framed_protocol = true framed_ip_address = true nas_port = true nas_ip_address = true real_name = true termination_action = true } # report_groups } # create_profile_wizard_options } # radius_accounting