From d7d44d84e8a2b07ec100b1c4f295559b7d6b21f1 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 29 Jul 2016 13:07:48 +0200 Subject: [PATCH] Extra options for grep_log plugin +lines -lines around the matched one --- pandora_agents/unix/plugins/grep_log | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pandora_agents/unix/plugins/grep_log b/pandora_agents/unix/plugins/grep_log index a84b344418..b51d8e0e24 100755 --- a/pandora_agents/unix/plugins/grep_log +++ b/pandora_agents/unix/plugins/grep_log @@ -204,24 +204,17 @@ sub parse_log (;$$) { # Push upper lines for (my $i = ($curr_line-$up_lines); $i<=$curr_line; $i++){ if (defined ($lines[$i])) { - print "metiendo (up): [" . $lines[$i] . "] $i\n"; push (@data, $lines[$i]); } - else{ - print "up: linea no definida $i\n"; - } + } } if (defined($bot_lines)){ # Push bottom lines for (my $i = ($curr_line+$flag); $i<=($curr_line+$bot_lines); $i++){ if (defined ($lines[$i])) { - print "metiendo(bot): [" . $lines[$i] . "] $i\n"; push (@data, $lines[$i]); } - else{ - print "up: linea no definida $i\n"; - } } } }