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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...