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!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...