Getting Data In

Remove 1 field from syslog before sending to Splunk Cloud?

JChris_
Path Finder

I have a system X that sends syslog to a Splunk HF which then sends to Splunk Cloud.

The syslog contains the same data in the fields msg and desc, so I'd like to remove the field desc in Splunk HF before sending the syslog. How can I do that?

I thought about using transforms.conf and props.conf (https://docs.splunk.com/Documentation/Splunk/7.0.3/Forwarding/Routeandfilterdatad#Discard_specific_e...), but this is used for dropping the entire log.

Labels (2)
0 Karma
1 Solution

diogofgm
SplunkTrust
SplunkTrust

You can use props and transforms to remove the desc part without dropping the entire log. You need to build a good regex in order to "select" and remove just the bits you want. This is also used in case you need to anonymise any part of your data before indexing it to splunk. In your case instead of replacing said data with "xxxx" you can replace it with nothing.

Check this example:
https://community.splunk.com/t5/Getting-Data-In/Anonymize-Data-in-Splunk-Search/m-p/238539

 

------------
Hope I was able to help you. If so, some karma would be appreciated.

View solution in original post

0 Karma

diogofgm
SplunkTrust
SplunkTrust

You can use props and transforms to remove the desc part without dropping the entire log. You need to build a good regex in order to "select" and remove just the bits you want. This is also used in case you need to anonymise any part of your data before indexing it to splunk. In your case instead of replacing said data with "xxxx" you can replace it with nothing.

Check this example:
https://community.splunk.com/t5/Getting-Data-In/Anonymize-Data-in-Splunk-Search/m-p/238539

 

------------
Hope I was able to help you. If so, some karma would be appreciated.
0 Karma

JChris_
Path Finder

Thanks, that's exactly what I end up doing after I posted this thread xD

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...