Splunk Search

show in a graph a numbers with two numbers after comma

tissparkle
Explorer

hi, I would like to build a graph with these values:

a 100
b 97,56
c 99,34

my issue is when i try to see a graph.. there is only one value show it in a graph the "A" and "100". The other values are not in a graph.
Why?

thx u soo much

0 Karma
1 Solution

Ayn
Legend

Most likely because Splunk doesn't consider the fields to be numerical. By default Splunk will consider "." to be a decimal sign but not ",". Short fix would be to replace "," with "." in your numbers.

View solution in original post

ddrillic
Ultra Champion

This should do it -

your base search
| eval basavalue="97,56"
| rex field=basavalue mode=sed "s/,/./g"
0 Karma

Ayn
Legend

Most likely because Splunk doesn't consider the fields to be numerical. By default Splunk will consider "." to be a decimal sign but not ",". Short fix would be to replace "," with "." in your numbers.

marcoscala
Builder

no way to converto those "string" into values?!?

0 Karma

rapmancz
Explorer

I have same issue. Is there any easy fix?

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 ...