Splunk Search

How to combine messages in a log file that match an ID into a single event ?

ricotries
Communicator

I am currently testing forwarding logs from a file I am monitoring, but the software that generates those logs creates a line per type event related to a process, while keeping an ID of the process that generated all the individual messages. Is there a way to combine/merge all messages with the same ID into an event when they reach the indexer (the IDs are unique, even when the process runs multiple times, it generates a new ID for every occurrence)? I'm looking for a solution that does not involve setting up a search that will generate the same result, I want all the messages stored as one event that then can be searched for more details.

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

There aren't any settings that will merge events at index time based on a field.
Consider writing a scripted input that reads the file and does the required processing before writing the results to stdout for indexing. You'll need a heavy forwarder to run the script.

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

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

There aren't any settings that will merge events at index time based on a field.
Consider writing a scripted input that reads the file and does the required processing before writing the results to stdout for indexing. You'll need a heavy forwarder to run the script.

---
If this reply helps you, Karma would be 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 ...