Alert Description Field unable to interpret \n

TeeKaypA
Tera Expert

Hi,

 

We are using Agent-Client-Collector for Monitoring.

The Checks-Output looks like this:

TeeKaypA_0-1690216915823.png

Unfortunately, the line breaks are not displayed in the event.

TeeKaypA_1-1690217034302.png

Therefore, I tried to insert "\n" or "\\n" to force a line break in the alert description field. It doesn't work either.

TeeKaypA_2-1690217234783.png

Any ideas? thanks in advance.

Thomas

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

pratiksha5
Mega Sage

I wanted to do a similar thing on the alert table. I have written a BR 

 

var text = current.description;
var new_text = text.replace(/\\n/g, '\n');
gs.log("New Decription " + new_text);
current.description = new_text;

 

The output looks right to me. 

Do mark it helpful or accept the answer if it solves the issue

 

View solution in original post

2 REPLIES 2

pratiksha5
Mega Sage

I wanted to do a similar thing on the alert table. I have written a BR 

 

var text = current.description;
var new_text = text.replace(/\\n/g, '\n');
gs.log("New Decription " + new_text);
current.description = new_text;

 

The output looks right to me. 

Do mark it helpful or accept the answer if it solves the issue

 

thanks, will try this