Splunk Search

Macro at time field extraction

me74fhfd
Path Finder

Hi, we use a lot of base64 encoded fields to save traffic bandwidth.
Is there any way to decode these fields at index time so they are automatically available in index and remove encoded ones. Ideally all this using macro 'base64'. I have tried to do this by field transformations but failed. Thanks 

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

IMO, the best solution is to stop using base64 to transmit data.  It's not an encryption mechanism and probably is not saving that much bandwidth (if any).

If you can't get away from base64 then consider writing a modular input that reads the data, converts it to plain text, and writes it to stdout for Splunk to index.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

s2_splunk
Splunk Employee
Splunk Employee

Besides the fact that I agree that relying on forwarder/SSL compression will probably yield your best bandwidth utilization, you can consider using INEGST_EVAL to create new fields at index time. 

Note, however, that this creates indexed fields, which will increase your storage utilization for index files. Depending on the cardinality of the data, this storage increase may be significant.

richgalloway
SplunkTrust
SplunkTrust

IMO, the best solution is to stop using base64 to transmit data.  It's not an encryption mechanism and probably is not saving that much bandwidth (if any).

If you can't get away from base64 then consider writing a modular input that reads the data, converts it to plain text, and writes it to stdout for Splunk to index.

---
If this reply helps you, Karma would be appreciated.
0 Karma

me74fhfd
Path Finder

@richgalloway, Can you please advise in that case what's the best solution to have this data decoded in the same index, as a different field because I require this data ready available. Thanks

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Macros are search-time features which cannot be used at index time.  I'm not aware of any index-time feature that can be used to decode base64 data.

Another way to reduce bandwidth use is to enable SSL compression.

---
If this reply helps you, Karma would be appreciated.
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...