Splunk Search

How to shorten the length of a value in a table column?

Explorer

I have a search that produces a table of results. Some of the text values for the first column are too long and it pushes everything over into overflow. How do I shorten or reformat the value of the table entry so it fits nicely (ie. I want to reduce the text value length to no more than 10 characters)? thanks

0 Karma

SplunkTrust
SplunkTrust

The table visualization in simple xml has an option for wrapping results,call wrap, check if that is set to true (which is default by the way).

You can use eval-substr method to reduce to length of a text field. (below example truncates the length to 10 char

your search | eval FieldWithLongValue=substr(FieldWithLongValue,1,10)