aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/suricata/suricata_alerts.js11
-rw-r--r--config/suricata/suricata_alerts.php1
-rw-r--r--config/suricata/suricata_alerts.widget.php2
-rw-r--r--config/suricata/suricata_check_cron_misc.inc6
4 files changed, 10 insertions, 10 deletions
diff --git a/config/suricata/suricata_alerts.js b/config/suricata/suricata_alerts.js
index db95bd0c..9e5b0b29 100644
--- a/config/suricata/suricata_alerts.js
+++ b/config/suricata/suricata_alerts.js
@@ -6,7 +6,7 @@ var suricataisPaused = false;
function suricata_alerts_fetch_new_rules_callback(callback_data) {
var data_split;
var new_data_to_add = Array();
- var data = callback_data.content;
+ var data = callback_data;
data_split = data.split("\n");
@@ -61,7 +61,14 @@ function fetch_new_surialerts() {
return;
suricataisBusy = true;
- getURL('/widgets/widgets/suricata_alerts.widget.php?getNewAlerts=' + new Date().getTime(), suricata_alerts_fetch_new_rules_callback);
+
+ jQuery.ajax('/widgets/widgets/suricata_alerts.widget.php?getNewAlerts=' + new Date().getTime(), {
+ type: 'GET',
+ dataType: 'text',
+ success: function(data) {
+ suricata_alerts_fetch_new_rules_callback(data);
+ }
+ });
}
function suricata_alerts_toggle_pause() {
diff --git a/config/suricata/suricata_alerts.php b/config/suricata/suricata_alerts.php
index 75f21333..3b135f32 100644
--- a/config/suricata/suricata_alerts.php
+++ b/config/suricata/suricata_alerts.php
@@ -280,7 +280,6 @@ if ($_POST['delete']) {
fclose($fd);
/* XXX: This is needed if suricata is run as suricata user */
mwexec('/bin/chmod 660 {$suricatalogdir}*', true);
- sigkillbypid("{$g['varrun_path']}/suricata_{$if_real}{$suricata_uuid}.pid", "HUP");
header("Location: /suricata/suricata_alerts.php?instance={$instanceid}");
exit;
}
diff --git a/config/suricata/suricata_alerts.widget.php b/config/suricata/suricata_alerts.widget.php
index 9ba502f7..370c6e96 100644
--- a/config/suricata/suricata_alerts.widget.php
+++ b/config/suricata/suricata_alerts.widget.php
@@ -191,7 +191,7 @@ var suri_nentries = <?php echo $suri_nentries; ?>;
$counter=0;
if (is_array($suricata_alerts)) {
foreach ($suricata_alerts as $alert) {
- $evenRowClass = $counter % 2 ? " listMRodd" : " listMReven";
+ $evenRowClass = $counter % 2 ? " listMReven" : " listMRodd";
echo(" <tr class='" . $evenRowClass . "'>
<td width='22%' class='listMRr' nowrap>" . $alert['instanceid'] . " " . $alert['dateonly'] . "<br/>" . $alert['timeonly'] . "</td>
<td width='39%' class='listMRr'>" . $alert['src'] . ":" . $alert['srcport'] . "<br>" . $alert['dst'] . ":" . $alert['dstport'] . "</td>
diff --git a/config/suricata/suricata_check_cron_misc.inc b/config/suricata/suricata_check_cron_misc.inc
index 2fdc7832..b2678059 100644
--- a/config/suricata/suricata_check_cron_misc.inc
+++ b/config/suricata/suricata_check_cron_misc.inc
@@ -95,12 +95,6 @@ if ($suricatalogdirsizeKB > 0 && $suricatalogdirsizeKB > $suricataloglimitsizeKB
// This is needed if suricata is run as suricata user
mwexec('/bin/chmod 660 /var/log/suricata/*', true);
-
- // Soft-restart Suricata process to resync logging
- if (file_exists("{$g['varrun_path']}/suricata_{$if_real}{$suricata_uuid}.pid")) {
- log_error(gettext("[Suricata] Restarting logging on {$value['descr']} ({$if_real})..."));
- mwexec("/bin/pkill -HUP -F {$g['varrun_path']}/suricata_{$if_real}{$suricata_uuid}.pid -a");
- }
}
conf_mount_ro();
log_error(gettext("[Suricata] Automatic clean-up of Suricata logs completed."));