Splunk Search

Help with SEDCMD props.conf

hayashi_ayr728
Engager

Hello. I am in problem.

I have  log like this.

 

1.example.log
2022/08/24 12:04:00,ExampreA,"xxx"xx"xxx"xxxx"xxx"xxxx"xxxxx"

 

I'd like to replace 「"」 with blank when  transferring logs to Indexer and I'd like to keep the first and last「"」.

 

I tried edit  config file「props.conf」(Indexer).

 

#props.conf
[sourcetype value]
SEDCMD-replacespaces = y/"/ /

 

Result is that all「"」were replaced 「 」.

I want to to capture log like this.(↓)

 

1.example.log
2022/08/24 12:04:00,ExampreA,"xxx xx xxx xxxx xxx xxxx xxxxx"

 

Please Any advise.

0 Karma

yuanliu
SplunkTrust
SplunkTrust

My first instinct is: Do not.  The change you are trying to make does not seem critical, and is much easier to handle at search time.

This said, based on the sample data structure, you can cheat this one out

y/"/ / s/, /, "/ s/ $/"/

 

Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...