aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/widget-snort/snort_alerts.inc14
-rw-r--r--config/widget-snort/snort_alerts.inc.php3
-rw-r--r--config/widget-snort/snort_alerts_helper.php13
3 files changed, 20 insertions, 10 deletions
diff --git a/config/widget-snort/snort_alerts.inc b/config/widget-snort/snort_alerts.inc
index 74adb4bb..08e6c3f7 100644
--- a/config/widget-snort/snort_alerts.inc
+++ b/config/widget-snort/snort_alerts.inc
@@ -6,11 +6,15 @@ require_once("includes/snort_alerts.inc.php");
$snort_alerts_title = "Snort Alerts";
$snort_alerts_title_link = "snort/snort_alerts.php";
-$snort_alerts_logfile = "{$g['varlog_path']}/snort/alert";
-$nentries = 10;
-$snort_alerts = get_snort_alerts($snort_alerts_logfile, $nentries);
+foreach (glob("{$g['varlog_path']}/snort/alert_*") as $alert) {
+ $snort_alerts_logfile = $alert;
+ $nentries = 10;
+ $snort_alerts = get_snort_alerts($snort_alerts_logfile, $nentries);
-/* AJAX related routines */
-handle_snort_ajax($snort_alerts_logfile, $nentries = 10);
+ /* AJAX related routines */
+ handle_snort_ajax($snort_alerts_logfile, $nentries);
+}
+if($_GET['lastsawtime'] or $_POST['lastsawtime'])
+ exit;
?>
diff --git a/config/widget-snort/snort_alerts.inc.php b/config/widget-snort/snort_alerts.inc.php
index b56ac02c..46d2b9a7 100644
--- a/config/widget-snort/snort_alerts.inc.php
+++ b/config/widget-snort/snort_alerts.inc.php
@@ -87,7 +87,6 @@ function handle_snort_ajax($snort_alerts_logfile, $nentries = 5, $tail = 50) {
}
}
echo $new_rules;
- exit;
}
}
-?> \ No newline at end of file
+?>
diff --git a/config/widget-snort/snort_alerts_helper.php b/config/widget-snort/snort_alerts_helper.php
index b49af1d8..46d68eac 100644
--- a/config/widget-snort/snort_alerts_helper.php
+++ b/config/widget-snort/snort_alerts_helper.php
@@ -3,9 +3,16 @@ require_once("globals.inc");
require_once("guiconfig.inc");
require_once("includes/snort_alerts.inc.php");
-$snort_alerts_logfile = "{$g['varlog_path']}/snort/alert";
-$nentries = 5;
-handle_snort_ajax($snort_alerts_logfile, $nentries);
+foreach (glob("{$g['varlog_path']}/snort/alert_*") as $alert) {
+ $snort_alerts_logfile = $alert;
+ $nentries = 5;
+ $snort_alerts = get_snort_alerts($snort_alerts_logfile, $nentries);
+
+ /* AJAX related routines */
+ handle_snort_ajax($snort_alerts_logfile, $nentries);
+}
+if($_GET['lastsawtime'] or $_POST['lastsawtime'])
+ exit;
?>
<script src="/javascript/scriptaculous/prototype.js" type="text/javascript"></script>