#! /usr/bin/perl
#
#  Purpose:  
#  FlowViewer_Configuration.pm holds global variables for the FlowViewer,
#  FlowGrapher, and FlowTracker NetFlow analysis tools.
#
#  Description:
#  Various parameters used to configure the system to a local environment.
#
#  Input arguments:
#  Name                 Description
#  -----------------------------------------------------------------------
#  None
#
#  Modification history:
#  Author       Date            Vers.   Description
#  -----------------------------------------------------------------------
#  J. Loiacono  07/04/2005      1.0     Original version.
#  J. Loiacono  01/01/2006      2.0     Flowgrapher, new functions, speed
#  J. Loiacono  01/16/2006      2.1     Introduced $flow_file_length
#  J. Loiacono  07/04/2006      3.0     Added parameters for Tracking, others
#  J. Loiacono  12/25/2006      3.1     Changes for MIN/MAX, permissions
#  J. Loiacono  02/22/2007      3.2     Minor changes for Groups
#  J. Loiacono  12/07/2007      3.3     Exporters, Logging, Time-zone
#                                       File cleanup, Pie charts
#
#$Author$
#$Date$
#$Header$
#
###########################################################################
#
#               BEGIN EXECUTABLE STATEMENTS
#
 
# Path variable

$ENV{PATH}               .= ':/usr/local/bin:/usr/sbin';

# Server

$FlowViewer_server       = "www.yourcompany.com";     # (IP address or hostname)

# Service

$FlowViewer_service      = "https";           # (http, or https)

# Directories and Files:

$reports_directory       = "/htp/htdocs/FlowViewer_3.3";
$reports_short           = "/FlowViewer_3.3";
$graphs_directory        = "/htp/htdocs/FlowGrapher_3.3";
$graphs_short            = "/FlowGrapher_3.3";
$tracker_directory       = "/htp/htdocs/FlowTracker_3.3";
$tracker_short           = "/FlowTracker_3.3";
$cgi_bin_directory       = "/htp/cgi-bin/FlowViewer_3.3";
$cgi_bin_short           = "/cgi-bin/FlowViewer_3.3";
$work_directory          = "/htp/cgi-bin/FlowViewer_3.3/Flow_Working";
$work_short              = "/cgi-bin/FlowViewer_3.3/Flow_Working";
$save_directory          = "/htp/htdocs/FlowViewer_Saves";
$save_short              = "/FlowViewer_Saves";
$names_directory         = "/htp/cgi-bin/FlowViewer_3.3";
$filter_directory        = "/htp/cgi-bin/FlowTracker_Files/FlowTracker_Filters";  
$rrdtool_directory       = "/htp/cgi-bin/FlowTracker_Files/FlowTracker_RRDtool";

$flow_data_directory     = "/htp/flows";
$exporter_directory      = "/htp/flows/all_routers";
$flow_bin_directory      = "/usr/bin";
$rrdtool_bin_directory   = "/usr/local/rrdtool-1.2.12/bin";

$actives_webpage         = "index.html";
$trackings_title         = "Your Company Name";
$user_logo               = "Generic_Logo.jpg";  # For a nice look make your logo 86 pixels high
$user_hyperlink          = "http://www.yourcompany.com/";

# General parameters

$version                 = "3.3";
@devices                 = ("router_1","router_2","router_3");
#@exporters               = ("192.168.100.1:New York Router","192.168.100.2:Prague Router");

$flow_capture_interval   = (30 * 60);
$flow_file_length        = (15 * 60);
$start_offset            = (90 * 60);  # e.g., 90 minutes ago
$end_offset              = (30 * 60);  # e.g., 30 minutes ago
$use_even_hours          = "Y";
$N                       = 3;
$use_NDBM                = "N";
$pie_chart_default       = 0;   # 0 = None;  1 = With Others;  2 = Without Others
$number_slices           = 6;
$maximum_days            = "91";
$remove_workfiles_time   = 86400;
$remove_graphfiles_time  = 7*86400;
$remove_reportfiles_time = 7*86400;
$time_zone               = "";         # If left empty, will use system time zone
$labels_in_titles        = "1";        # Set to "1" for labels in Tracker graph titles; "0" off

# Debug Parameters 

$debug_viewer            = "Y";
$debug_grapher           = "Y";
$debug_tracker           = "Y";
$debug_group             = "Y";
$debug_files             = "N";

# Graphing parameters
 
$transparent        = "0";   
$x_ticks            = "T";
$long_ticks         = "T";
$skip_undef         = "T";
$graph_height       = 310;
$graph_width        = 600;
$t_margin           = 10;
$b_margin           = 60;
$l_margin           = 10;
$r_margin           = 20;
$bgclr              = "white";
$borderclrs         = "black";
$boxclr             = "white";
$fgclr              = "gray90";
$labelclr           = "black";
$axislabelclr       = "black";
$legendclr          = "black";
$valuesclr          = "black";
$textclr            = "black";
$x_axis_font        = "('arial', 16)";
$horz_max           = ($graph_width / 2) - 44;
$horz_pct           = ($graph_width / 2) - 44;
$horz_avg           = ($graph_width / 2) - 44;
$horz_min           = ($graph_width / 2) - 44;
$vert_max           = ($graph_height - 70) + 2;
$vert_pct           = ($graph_height - 70) + 16;
$vert_avg           = ($graph_height - 70) + 30;
$vert_min           = ($graph_height - 70) + 44;

# Tracking parameters
 
$log_directory      = "/htp/cgi-bin/FlowViewer_3.3";
$log_collector_short= "Y";
$log_collector_med  = "N";
$log_collector_long = "N";
$log_grapher_short  = "Y";
$log_grapher_long   = "N";
$collection_offset  = 1800;
$collection_period  = 300;
$graphing_period    = 300;
$use_existing_concats = "Y";

$rrd_dir_perms      = 0777;
$filter_dir_perms   = 0777;
$work_dir_perms     = 0777;
$html_dir_perms     = 0777;

$html_file_perms    = 0777;
$graph_file_perms   = 0777;
$rrd_file_perms     = 0777;
$filter_file_perms  = 0777;
$tracker_file_perms = 0777;
$actives_file_perms = 0777;
$saved_filters_perms= 0777;

$rrd_area           = "FFE0C0";   
$rrd_line           = "000000";   
$rrd_peak           = "000000";
$rrd_width          = 600;
$rrd_height         = 150;
$rrd_font           = "000000AA";
$rrd_back           = "FFFFFF";
$rrd_canvas         = "FFFFFF";
$rrd_grid           = "CCCCCC88";
$rrd_mgrid          = "FF000033";
$rrd_frame          = "FFFFFF";
$rrd_shadea         = "FFFFFF";
$rrd_shadeb         = "FFFFFF";
$rrd_thick          = 0.3;
$rrd_lower_limit    = 0;
$rrd_slope_mode     = "";      # $rrd_slope_mode = "--slope-mode"; will turn this on
$rrd_vrule_color    = "FF0000";
$rrd_hrule_color    = "FF0000";

$hr_width           = $rrd_width + 130;

# Webpage Parameters

$bg_color           = "#F8F8F8"; 
$text_color         = "#000000";
$link_color         = "#006699";
$vlink_color        = "#BF294D";

# Commands (full directory names)
 
$dig                = "/usr/bin/dig +time=1 -x ";
