Hi,
I need to display an overall status in a dashboard (Single Value) based on results returned from my splunk queries.
Example:
| Job | Status | 
| A | OK | 
| B | OK | 
| C | Failed | 
| D | Pending | 
Any suggestions if the above is possible?
 
					
				
		
 
		
		
		
		
		
	
			
		
		
			
					
		Hi @worldexplorer81,
in this case, you have to group events and check the condition, something like this:
your_search
| stats dc(status) AS dc_status values(status) AS status
| eval overallStatus=case(dc_status=1 AND status="OK","OK",dc_status=1 AND status="Pending","Pending",dc_status=1 AND status="Pending","Failure",dc_status>1 AND like(status,"%Failed%"),"Failure", dc_status>1 AND like(status,"%Failed%")AND like(status,"%Pending%"),"Partial OK")
| fields overallStatusCiao.
Giuseppe
Hi @gcusello ,
The dashboard should only have 1 single value for Overall Status (either OK, Failure, Partial OK or Pending) depending on the different values of the field status returned from my search
 
					
				
		
 
		
		
		
		
		
	
			
		
		
			
					
		Hi @worldexplorer81,
in this case, you have to group events and check the condition, something like this:
your_search
| stats dc(status) AS dc_status values(status) AS status
| eval overallStatus=case(dc_status=1 AND status="OK","OK",dc_status=1 AND status="Pending","Pending",dc_status=1 AND status="Pending","Failure",dc_status>1 AND like(status,"%Failed%"),"Failure", dc_status>1 AND like(status,"%Failed%")AND like(status,"%Pending%"),"Partial OK")
| fields overallStatusCiao.
Giuseppe
Thanks @gcusello - Will give it a try!
 
					
				
		
 
		
		
		
		
		
	
			
		
		
			
					
		Hi @worldexplorer81,
good for you, see next time!
Ciao and happy splunking
Giuseppe
P.S.: Karma Points are appreciated 😉
 
					
				
		
 
		
		
		
		
		
	
			
		
		
			
					
		Hi @worldexplorer81,
let me understand: do youwant to create a dashboard with four Single values, each one displaying one value of your table, is it correct?
if thisis your need, youhave to create a Post Process Search in your dashboard and then in each Single Value Panel, put one value.
Ciao.
Giuseppe
