Splunk ITSI

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!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...