Splunk Search

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

Hung_Nguyen
Path Finder

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

somesoni2
Revered Legend

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)
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...