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!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...