Thats strange, I've just copy/paste you eval for description and add an if() in it.
But I think I understand what you wanted to do now, try that :
index=abc
|rex field=_raw "MACHINE\:\s(?[^ ]+).*"
| eval time = strftime(_time,"%Y/%m/%d %H:%M:%S") ,
node = host ,
resource = "Auto" ,
type = "Alarm" ,
severity = 1,
Machine_Name = case(isnull(Machine_Name),"NONE",isnotnull(Machine_Name),Machine_Name,1=1,"unknown"),
description = if(isnull(Machine_Name),"CAUAJM:" .CAUAJM ." STATUS:" . STAT . " JOB:" . JOB_Name . " MACHINE:No Machine" . " with ExitCode:" .EXITCODE. " at:" . time . " Environment:AWP","CAUAJM:" .CAUAJM ." STATUS:" . STAT . " JOB:" . JOB_Name . " MACHINE:" .Machine_Name. " with ExitCode:" .EXITCODE. " at:" . time . " Environment:AWP" )
| table node resource type severity CAUAJM job_event JOB_Name Machine_Name time description
Let me explain : if your Machine_name field is null, it will return the descrption with MACHINE:No Machine (put whatever you want here), if not, it should return the full description.
... View more