Splunk Search

Replace string to replace entire Message field with another message for specific EventCode??

priya0709
Path Finder

My query searches for (Eventcode=509 OR EventCode=118) and generates output (host, Time, EventCode, Task category, Mesaage)

Is it possible to use REPLACE to replace entire message field with another message associated with the EventCode??

 

Labels (1)
0 Karma
1 Solution

skoelpin
SplunkTrust
SplunkTrust

Use some conditional logic combined with an eval to get it done 

 

| eval Message=if(Eventcode=509 OR EventCode=118,"Insert new message here",Message)

View solution in original post

0 Karma

priya0709
Path Finder

My query searches for eventcode and displays (host, time, task category, message) i want to use some color to highlight all  same hosts generating multiple eventcode??

please help with the query

 

0 Karma

skoelpin
SplunkTrust
SplunkTrust

Use some conditional logic combined with an eval to get it done 

 

| eval Message=if(Eventcode=509 OR EventCode=118,"Insert new message here",Message)

0 Karma

priya0709
Path Finder

thank you!!! This worked😊😊

skoelpin
SplunkTrust
SplunkTrust

If my solution worked, can you accept it rather than your own? 

Tags (1)
0 Karma
Get Updates on the Splunk Community!

Say goodbye to manually analyzing phishing and malware threats with Splunk Attack ...

In today’s evolving threat landscape, we understand you’re constantly bombarded with phishing and malware ...

AppDynamics is now part of Splunk Ideas

Hello Splunkers, We have exciting news for you! AppDynamics has been added to the Splunk Ideas Portal. Which ...

Advanced Splunk Data Management Strategies

Join us on Wednesday, May 14, 2025, at 11 AM PDT / 2 PM EDT for an exclusive Tech Talk that delves into ...