Hi Splunkers, I have some issues creating a time chart from the below report. Pie chart looks great but for some reason I can't get a time chart working: | eval start_time_epoch = strptime(reported_time,"%b %d %Y %H:%M:%S")
| eval start_time_second = strftime(start_time_epoch,"%S")
| eval start_time_epoch_rounded = start_time_epoch - start_time_second - 5*3600
| fields - start_time_epoch, start_time_second
| eval close_time_epoch = strptime(processed_time,"%b %d %Y %H:%M:%S")
| eval close_time_second = strftime(close_time_epoch,"%S")
| eval close_time_epoch_rounded = close_time_epoch - close_time_second - 5*3600
| fields - close_time_epoch, close_time_second
| eval minute = mvrange(0, (close_time_epoch_rounded - start_time_epoch_rounded), 60)
| mvexpand minute
| eval _time = start_time_epoch_rounded + minute
| eval myHour = strftime(_time,"%H")
| eval myMinute = strftime(_time,"%M")
| eval myDay = strftime(_time,"%A")
| where myDay != "Saturday" AND myDay != "Sunday" AND (myHour >= 8 AND myHour < 20)
| eval ReportedTime = strftime(start_time_epoch_rounded,"%b %d %Y %H:%M:%S")
| eval ProcessedTime = strftime(close_time_epoch_rounded,"%b %d %Y %H:%M:%S")
| stats count as durationInMinutes by ticket,ReportedTime,ProcessedTime
| eval duration = tostring(durationInMinutes*60, "duration")
| eval SLO=if(durationInMinutes>60,"SLO Fail","SLO Achieved")
| table ticket,ReportedTime,ProcessedTime,duration,SLO
| chart count by SLO This is how the pie chart looks like: I'd like to get a timechart showing a line for the missed SLOs against the total. If there are no SLOs missed then the line should be at 100%. This is what I tried and it's not working: | eval start_time_epoch = strptime(reported_time,"%b %d %Y %H:%M:%S")
| eval start_time_second = strftime(start_time_epoch,"%S")
| eval start_time_epoch_rounded = start_time_epoch - start_time_second - 5*3600
| fields - start_time_epoch, start_time_second
| eval close_time_epoch = strptime(processed_time,"%b %d %Y %H:%M:%S")
| eval close_time_second = strftime(close_time_epoch,"%S")
| eval close_time_epoch_rounded = close_time_epoch - close_time_second - 5*3600
| fields - close_time_epoch, close_time_second
| eval minute = mvrange(0, (close_time_epoch_rounded - start_time_epoch_rounded), 60)
| mvexpand minute
| eval _time = start_time_epoch_rounded + minute
| eval myHour = strftime(_time,"%H")
| eval myMinute = strftime(_time,"%M")
| eval myDay = strftime(_time,"%A")
| where myDay != "Saturday" AND myDay != "Sunday" AND (myHour >= 8 AND myHour < 20)
| eval ReportedTime = strftime(start_time_epoch_rounded,"%b %d %Y %H:%M:%S")
| eval ProcessedTime = strftime(close_time_epoch_rounded,"%b %d %Y %H:%M:%S")
| stats count as durationInMinutes by ticket,ReportedTime,ProcessedTime
| eval duration = tostring(durationInMinutes*60, "duration")
| eval SLO=if(durationInMinutes>60,"SLO Fail","SLO Achieved")
| table ticket,ReportedTime,ProcessedTime,duration,SLO
| timechart count(SLO), count(SLO Fail) as Missed | eval Percent=round(Missed*100/SLO,2) Any ideas what's missing? thank you!
... View more