From f132caa07f3691132fbfb921840d1b9603a9f5b2 Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Tue, 4 Mar 2014 12:54:32 -0500 Subject: No SIGHUP required to Suricata when clearing logs, so remove calls. --- config/suricata/suricata_alerts.php | 1 - config/suricata/suricata_check_cron_misc.inc | 6 ------ 2 files changed, 7 deletions(-) (limited to 'config') 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_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.")); -- cgit v1.2.3 From 09ee53a7c9bbb16772b6db52da8b4f4f70338616 Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Tue, 4 Mar 2014 12:57:08 -0500 Subject: Fix "even/odd" table row class assigns in widget -- they were backwards. --- config/suricata/suricata_alerts.widget.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') 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 = ; $counter=0; if (is_array($suricata_alerts)) { foreach ($suricata_alerts as $alert) { - $evenRowClass = $counter % 2 ? " listMRodd" : " listMReven"; + $evenRowClass = $counter % 2 ? " listMReven" : " listMRodd"; echo(" " . $alert['instanceid'] . " " . $alert['dateonly'] . "
" . $alert['timeonly'] . " " . $alert['src'] . ":" . $alert['srcport'] . "
" . $alert['dst'] . ":" . $alert['dstport'] . " -- cgit v1.2.3 From 15cdf2213efa54130a0962d5a22d30df7cc0cefe Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Tue, 4 Mar 2014 12:58:22 -0500 Subject: Revert back to Ajax.url() call in widget because getURL() not in 2.1 -- oops! --- config/suricata/suricata_alerts.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'config') 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() { -- cgit v1.2.3