Hello Team,
I have used to ask the same question in my previous ask : https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-compare-two-weeks-errors-and-highlight/m-p/617827#M2147...
See more...
Hello Team,
I have used to ask the same question in my previous ask : https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-compare-two-weeks-errors-and-highlight/m-p/617827#M214708
I am not having the correct results while using the suggested workaround in SPL. So I have modified my SPL as below. Here my release is for 14 days and I need to compare the events with "Current_release_error" & "Last_release_error". If any new error only present in current release then I want to call out those results. Pease suggest some value workarounds.
index="ABC" source="/abc.log" ("ERROR" OR "EXCEPTION") earliest=-14d latest=now()
| rex "Error\s(?<Message>.+)MulesoftAdyenNotification" | rex "fetchSeoContent\(\)\s(?<Exception>.+)"
| rex "Error:(?<Error2>.+)"
| rex "(?<ErrorM>Error in template script)+"
| rex "(?ms)^(?:[^\\|\\n]*\\|){3}(?P<Component>[^\\|]+)"
| rex "service=(?<Service>[A-Za-z._]+)"
| rex "Sites-(?<Country>[A-Z]{2})" | eval Error_Exception= coalesce(Message,Error2,Exception,ErrorM)
| eval Week=case(_time<relative_time(now(),"-14d@d"),"Current_release_error",_time>relative_time(now(),"-28d@d-14d@d"),"Last_release_error")
| stats dc(Week) AS Week_count values(Week) AS Week BY Error_Exception
| eval Week=if(Week_count=2,"Present in Previous Release",Week)
| where Week_count=1