Splunk Search

Decimal places format

katalinali
Path Finder

Hi all,

I have some statistical log like:
Unit Type (M) Used Rqs Size (K) Rqs Rqs

 1  4326    35165  63.4     .1       5.8     .0     .1
 2  4326    35165  63.4     .2       9.8     .1     .1
 3  4326    17582  77.4     .1       6.3     .0     .1
 4  4326    35165  63.4     .2       8.5     .0     .1
 5  4326    17582  77.4     .1       5.1     .0     .1
 6  4326    35165  63.4     .2       8.1     .0     .2

I used multikv to extract it as field & value pair, but I find ".1", ".2", ".0" is analysed as string instead of numeric, Is there any way that splunk is analysed as numeric. It's better if it can do so when splunk index the data. Thanks.

Tags (1)
0 Karma

Ayn
Legend

Use convert. It is used for this very purpose, converting field values into numerical values.

<yoursearch> | convert auto(<yourfield>)

More information on the convert command is available here: http://docs.splunk.com/Documentation/Splunk/4.2.2/SearchReference/Convert

Ayn
Legend

So, to get this straight - do you have a field with the value ".1" in it, but it's not treated as a numerical field?

0 Karma

katalinali
Path Finder

I have tested "| convert auto(field)", but it doesn't work.

Are there other recommendation. Thanks.

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...