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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...