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!

Splunk App for Anomaly Detection End of Life Announcement

Q: What is happening to the Splunk App for Anomaly Detection?A: Splunk is officially announcing the ...

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...