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!

Admin Your Splunk Cloud, Your Way

Join us to maximize different techniques to best tune Splunk Cloud. In this Tech Enablement, you will get ...

Cloud Platform | Discontinuing support for TLS version 1.0 and 1.1

Overview Transport Layer Security (TLS) is a security communications protocol that lets two computers, ...

New Customer Testimonials

Enterprises of all sizes and across different industries are accelerating cloud adoption by migrating ...