Splunk Enterprise

Change Values Indexation

leandromatperei
Path Finder

Hello,

the Value and Shipping fields have commas, and refer to the currency, there is a way to treat this data before indexing, so that this data is treated as a "." in place of the ","

This makes it impossible when summing and averaging values.

Ex:

Original:

IP=189.41.40.129,Produto="Test1",Valor=179,00,Categoria=Banho,Campanha=1,Vendeu=1,MetododeCompra=1,Bandeira=1,Transportadora=2,Frete=18,57,"_time"2021/01/25 19:20:37.374"
IP=201.0.205.197,Produto="Test2",Valor=123,98,Categoria=Jogos,Campanha=1,Vendeu=0,MetododeCompra=0,Bandeira=0,Transportadora=5,Frete=12,58,"_time"2021/01/25 19:20:38.977"
IP=187.125.147.178,Produto="Teste3",Valor=139,90,Categoria=Cozinha,Campanha=1,Vendeu=1,MetododeCompra=1,Bandeira=1,Transportadora=3,Frete=14,27,"_time"2021/01/25 19:20:38.977"
IP=187.115.202.233,Produto="Test4",Valor=139,90,Categoria=Cozinha,Campanha=1,Vendeu=1,MetododeCompra=1,Bandeira=1,Transportadora=2,Frete=14,51,"_time"2021/01/25 19:20:39.579"
IP=187.111.15.221,Produto="Test5",Valor=164,00,Categoria=Banho,Campanha=2,Vendeu=1,MetododeCompra=1,Bandeira=1,Transportadora=1,Frete=16,81,"_time"2021/01/25 19:20:40.580"


Change:

IP=189.41.40.129,Produto="Test1",Valor=179.00,Categoria=Banho,Campanha=1,Vendeu=1,MetododeCompra=1,Bandeira=1,Transportadora=2,Frete=18.57,"_time"2021/01/25 19:20:37.374"
IP=201.0.205.197,Produto="Test2",Valor=123.98,Categoria=Jogos,Campanha=1,Vendeu=0,MetododeCompra=0,Bandeira=0,Transportadora=5,Frete=12.58,"_time"2021/01/25 19:20:38.977"
IP=187.125.147.178,Produto="Teste3",Valor=139.90,Categoria=Cozinha,Campanha=1,Vendeu=1,MetododeCompra=1,Bandeira=1,Transportadora=3,Frete=14.27,"_time"2021/01/25 19:20:38.977"
IP=187.115.202.233,Produto="Test4",Valor=139.90,Categoria=Cozinha,Campanha=1,Vendeu=1,MetododeCompra=1,Bandeira=1,Transportadora=2,Frete=14.51,"_time"2021/01/25 19:20:39.579"
IP=187.111.15.221,Produto="Test5",Valor=164.00,Categoria=Banho,Campanha=2,Vendeu=1,MetododeCompra=1,Bandeira=1,Transportadora=1,Frete=16.81,"_time"2021/01/25 19:20:40.580"

 

Labels (2)
Tags (1)
0 Karma

scelikok
SplunkTrust
SplunkTrust

Hi @leandromatperei,

You can use anonymize data method using sec command on indexers props.conf,

https://docs.splunk.com/Documentation/SplunkCloud/8.1.2012/Data/Anonymizedata#Anonymize_data_with_a_...

Below should work on your case;

[your_sourcetype]
SEDCMD-fix_currency = s/Valor=(\d+),(\d{2})/Valor=\1.\2/g s/Frete=(\d+),(\d{2})/Frete=\1.\2/g
If this reply helps you an upvote and "Accept as Solution" is appreciated.
0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...