From 3ded21fc48a46974795072defc35541dc2f0690b Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Sat, 13 Sep 2014 10:38:02 -0400 Subject: Add handler and install code for new LOG MGMT function. --- config/snort/snort_log_mgmt.php | 44 +++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 10 deletions(-) (limited to 'config/snort/snort_log_mgmt.php') diff --git a/config/snort/snort_log_mgmt.php b/config/snort/snort_log_mgmt.php index aee98a99..4415863b 100644 --- a/config/snort/snort_log_mgmt.php +++ b/config/snort/snort_log_mgmt.php @@ -55,6 +55,8 @@ $pconfig['stats_log_limit_size'] = $config['installedpackages']['snortglobal'][' $pconfig['stats_log_retention'] = $config['installedpackages']['snortglobal']['stats_log_retention']; $pconfig['sid_changes_log_limit_size'] = $config['installedpackages']['snortglobal']['sid_changes_log_limit_size']; $pconfig['sid_changes_log_retention'] = $config['installedpackages']['snortglobal']['sid_changes_log_retention']; +$pconfig['event_pkts_log_limit_size'] = '0'; +$pconfig['event_pkts_log_retention'] = $config['installedpackages']['snortglobal']['event_pkts_log_retention']; // Load up some arrays with selection values (we use these later). // The keys in the $retentions array are the retention period @@ -80,18 +82,16 @@ if (!isset($pconfig['alert_log_retention'])) $pconfig['alert_log_retention'] = "336"; if (!isset($pconfig['stats_log_retention'])) $pconfig['stats_log_retention'] = "168"; -if (!isset($pconfig['u2_archive_log_retention'])) - $pconfig['u2_archive_log_retention'] = "168"; if (!isset($pconfig['sid_changes_log_retention'])) $pconfig['sid_changes_log_retention'] = "336"; +if (!isset($pconfig['event_pkts_log_retention'])) + $pconfig['event_pkts_log_retention'] = "336"; // Set default log file size limits if (!isset($pconfig['alert_log_limit_size'])) $pconfig['alert_log_limit_size'] = "500"; if (!isset($pconfig['stats_log_limit_size'])) $pconfig['stats_log_limit_size'] = "500"; -if (!isset($pconfig['unified2_log_limit'])) - $pconfig['unified2_log_limit'] = "32"; if (!isset($pconfig['sid_changes_log_limit_size'])) $pconfig['sid_changes_log_limit_size'] = "250"; @@ -101,10 +101,12 @@ if ($_POST['ResetAll']) { $pconfig['alert_log_retention'] = "336"; $pconfig['stats_log_retention'] = "168"; $pconfig['sid_changes_log_retention'] = "336"; + $pconfig['event_pkts_log_retention'] = "336"; $pconfig['alert_log_limit_size'] = "500"; $pconfig['stats_log_limit_size'] = "500"; $pconfig['sid_changes_log_limit_size'] = "250"; + $pconfig['event_pkts_log_limit_size'] = "0"; /* Log a message at the top of the page to inform the user */ $savemsg = gettext("All log management settings on this page have been reset to their defaults. Click APPLY if you wish to keep these new settings."); @@ -142,6 +144,8 @@ if ($_POST["save"] || $_POST['apply']) { $config['installedpackages']['snortglobal']['stats_log_retention'] = $_POST['stats_log_retention']; $config['installedpackages']['snortglobal']['sid_changes_log_limit_size'] = $_POST['sid_changes_log_limit_size']; $config['installedpackages']['snortglobal']['sid_changes_log_retention'] = $_POST['sid_changes_log_retention']; + $config['installedpackages']['snortglobal']['event_pkts_log_limit_size'] = $_POST['event_pkts_log_limit_size']; + $config['installedpackages']['snortglobal']['event_pkts_log_retention'] = $_POST['event_pkts_log_retention']; write_config("Snort pkg: saved updated configuration for LOGS MGMT."); sync_snort_package_config(); @@ -194,7 +198,7 @@ if ($savemsg) { $tab_array[6] = array(gettext("Suppress"), false, "/snort/snort_interfaces_suppress.php"); $tab_array[7] = array(gettext("IP Lists"), false, "/snort/snort_ip_list_mgmt.php"); $tab_array[8] = array(gettext("SID Mgmt"), false, "/snort/snort_sid_mgmt.php"); - $tab_array[9] = array(gettext("Log Mgmt"), true, "/snort/snort_logs_mgmt.php"); + $tab_array[9] = array(gettext("Log Mgmt"), true, "/snort/snort_log_mgmt.php"); $tab_array[10] = array(gettext("Sync"), false, "/pkg_edit.php?xml=snort/snort_sync.xml"); display_top_tabs($tab_array, true); ?> @@ -284,7 +288,7 @@ if ($savemsg) { @@ -292,13 +296,31 @@ if ($savemsg) { + + + event pcaps + + + + + + + sid_changes $p): ?> @@ -324,7 +346,7 @@ if ($savemsg) { @@ -332,7 +354,7 @@ if ($savemsg) { @@ -371,6 +393,8 @@ function enable_change() { document.iform.stats_log_retention.disabled = endis; document.iform.sid_changes_log_retention.disabled = endis; document.iform.sid_changes_log_limit_size.disabled = endis; + document.iform.event_pkts_log_limit_size.disabled = endis; + document.iform.event_pkts_log_retention.disabled = endis; } function enable_change_dirSize() { -- cgit v1.2.3