How to add new line "\n" as delimiter for Splunk field mapping?

Raghav Kakkar
Tera Expert

Hello all,

 

I just wanted to know if I can set new line "\n" as a delimiter for Splunk ES field mapping. If I do comma separation, the data looks quite shabby, as I'm trying to populate the description field with 8-9 fields. 

 

I tried putting "\n" in the property, but that did not work.

RaghavKakkar_0-1744202280099.png

 

I want to avoid scripting in the field mapping.

 

Is there any other way to achieve this?

1 ACCEPTED SOLUTION

andy_ojha
ServiceNow Employee
ServiceNow Employee

Hey there - on the Splunk Event Profile > Field Mapping > Large multi-line string field (e.g. Description)

 

You can just add a return / line break (enter / return key on your keyboard) for the various fields you intend to map within the description.  They will show up as a separate line - no need to script or use the delimiter.

 

It's a common method to leverage the format of "Field: ${Value}" for legibility.

 

Another tip, where you may try to do lookups and set reference fields on a best effort - (e.g. CI, Affected User), you can also map the raw string value to the Description as a fallback, in-case you are not able to to successfully match to a record in your lookup.

 

Reference:

andy_ojha_0-1744206846855.png

 

andy_ojha_1-1744206997919.png

 

 

 

 

 

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Raghav Kakkar 

how is the integration configured to map for this field?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

andy_ojha
ServiceNow Employee
ServiceNow Employee

Hey there - on the Splunk Event Profile > Field Mapping > Large multi-line string field (e.g. Description)

 

You can just add a return / line break (enter / return key on your keyboard) for the various fields you intend to map within the description.  They will show up as a separate line - no need to script or use the delimiter.

 

It's a common method to leverage the format of "Field: ${Value}" for legibility.

 

Another tip, where you may try to do lookups and set reference fields on a best effort - (e.g. CI, Affected User), you can also map the raw string value to the Description as a fallback, in-case you are not able to to successfully match to a record in your lookup.

 

Reference:

andy_ojha_0-1744206846855.png

 

andy_ojha_1-1744206997919.png