Splunk Search

Search Condition in index

chuck_life09
Path Finder

Hi,

I want to search the index with the eventtype which has "service" or "window" in the value

index=sdsf | search eventtype="*service*" or "*window*"  | stats count by eventtype

this is not working. can you help if the OR will work or not.

Labels (1)
Tags (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

How is it not working? No results or wrong results?

index=sdsf | search eventtype="*service*" or eventtype="*window*"  | stats count by eventtype

View solution in original post

gcusello
SplunkTrust
SplunkTrust

HI @chuck_life09,

try to put the search conditions as in the main search as possible:

index=sdsf (eventtype="*service*" OR eventtype="*window*")  
| stats count by eventtype

Ciao.

Giuseppe

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

How is it not working? No results or wrong results?

index=sdsf | search eventtype="*service*" or eventtype="*window*"  | stats count by eventtype

chuck_life09
Path Finder

Hi,

@ITWhisperer 

Thank you this worked, it dint show me results that were pertaining to "service" or "window". now it is showing me the events which has either of those 2 words.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...