Commit 8a396a64 authored by Ad Schellevis's avatar Ad Schellevis

fix log parser after removal of tracker

parent 5640547a
...@@ -58,7 +58,7 @@ function conv_log_filter($logfile, $nentries, $tail = 50, $filtertext = "", $fil ...@@ -58,7 +58,7 @@ function conv_log_filter($logfile, $nentries, $tail = 50, $filtertext = "", $fil
exec("/usr/sbin/fifolog_reader " . escapeshellarg($logfile) . " | /usr/bin/grep 'filterlog:' | /usr/bin/tail -r -n {$tail}", $logarr); exec("/usr/sbin/fifolog_reader " . escapeshellarg($logfile) . " | /usr/bin/grep 'filterlog:' | /usr/bin/tail -r -n {$tail}", $logarr);
else else
exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . " | grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/grep 'filterlog:' | /usr/bin/tail -r -n {$tail}", $logarr); exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . " | grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/grep 'filterlog:' | /usr/bin/tail -r -n {$tail}", $logarr);
$filterlog = array(); $filterlog = array();
$counter = 0; $counter = 0;
...@@ -144,12 +144,14 @@ function parse_filter_line($line) { ...@@ -144,12 +144,14 @@ function parse_filter_line($line) {
$flent['rulenum'] = $rule_data[$field++]; $flent['rulenum'] = $rule_data[$field++];
$flent['subrulenum'] = $rule_data[$field++]; $flent['subrulenum'] = $rule_data[$field++];
$flent['anchor'] = $rule_data[$field++]; $flent['anchor'] = $rule_data[$field++];
$field++; // skip field
$flent['realint'] = $rule_data[$field++]; $flent['realint'] = $rule_data[$field++];
$flent['interface'] = convert_real_interface_to_friendly_descr($flent['realint']); $flent['interface'] = convert_real_interface_to_friendly_descr($flent['realint']);
$flent['reason'] = $rule_data[$field++]; $flent['reason'] = $rule_data[$field++];
$flent['act'] = $rule_data[$field++]; $flent['act'] = $rule_data[$field++];
$flent['direction'] = $rule_data[$field++]; $flent['direction'] = $rule_data[$field++];
$flent['version'] = $rule_data[$field++]; $flent['version'] = $rule_data[$field++];
if ($flent['version'] == '4' || $flent['version'] == '6') { if ($flent['version'] == '4' || $flent['version'] == '6') {
if ($flent['version'] == '4') { if ($flent['version'] == '4') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment