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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...