Splunk IT Service Intelligence

How to combine a few eval cases to a single search?

faizolsaidin
Explorer

Hi,

How could i combine few eval cases into single count search.

Search as below :

| eval a = case(Name LIKE "abc%efg%123" AND State="Running",1,Name LIKE "abc%efg%123" AND State!="Running",0) 
| eval b = case(Name LIKE "abc%efg%456" AND State="Running",1,Name LIKE "abc%efg%456" AND State!="Running",0) 
| eval c = case(Name LIKE "abc%efg%789" AND State="Running",1,Name LIKE "abc%efg%789" AND State!="Running",0) 
0 Karma

PowerPacked
Builder

Hi @faizolsaidin

Am not sure, if i understood your question correctly

But you can give multiple eval statements in single eval like below,

| eval a = case(Name LIKE "abc%efg%123" AND State="Running",1,Name LIKE "abc%efg%123" AND State!="Running",0),  b = case(Name LIKE "abc%efg%456" AND State="Running",1,Name LIKE "abc%efg%456" AND State!="Running",0), c = case(Name LIKE "abc%efg%789" AND State="Running",1,Name LIKE "abc%efg%789" AND State!="Running",0) 

Thanks

0 Karma

faizolsaidin
Explorer

My bad, my question should be with the query that i had from the eval cases above, i would like to combine it in order to monitor all cases in single search instead to have it separately. Since it was part of my base search but i'm creating this of 1 piece in my Glass table. Hope this helps to clarify.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...