diff --git a/pandora_agents/unix/plugins/grep_log b/pandora_agents/unix/plugins/grep_log
index ad45ab2943..2e17210a51 100755
--- a/pandora_agents/unix/plugins/grep_log
+++ b/pandora_agents/unix/plugins/grep_log
@@ -325,7 +325,9 @@ sub print_log ($) {
$output .= "\n";
$output .= "{$line};
+ my $processed_line = $line;
+ $processed_line =~ s/\]\]/]]]]>";
$output .= "\n";
@@ -343,7 +345,9 @@ sub print_log ($) {
foreach my $line (@kdata) {
$output .= "{$line}}) {
- $output .= $content;
+ my $processed_line = $content;
+ $processed_line =~ s/\]\]/]]]]>\n";
}