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.

Labels (1)
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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...