Splunk Search

Condition and Search string together not working

satyajit2007
Explorer

 

In Total_error Count , I want to add if the logs contains string like "exception", "failed", "error" ( Case Insensitive if possible ).  in addition to level=ERROR condition. 

 

 

index=myIndex sourcetype=mySourceType | 
timechart count as total_logs count(eval(level="INFO")) as total_info count(eval(level="WARN")) as total_warn count(eval(level="ERROR")  ) as total_error span=1h

 

 

 

Added those search criteria like this . did not work . 

count(eval(level="ERROR" OR ("Failed" OR "Exception" OR "Fatal")  )

 

The condition should be 

where level="ERROR" OR ( log like '%failed%' or log like '%Exception%')    ( case should not matter). 

Need your expert advise.

Labels (4)
Tags (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

I replied to your previous message on this topic.  https://community.splunk.com/t5/Splunk-Search/Search-strings-and-conditions-together/m-p/529223/high...

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...