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!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...