Splunk Search

time lost duration format in a join search

sou128
Explorer

I have a simple join search as follow,

index=portal bam="audit" event="userLogout" | stats median(secSessDur) as medDur | eval medDur = round(medDur) | fieldformat medDur = tostring(medDur,"duration") | join [search index=portal bam="audit" event="userLogout" | stats avg(secSessDur) as medDur2 | eval medDur2 = round(medDur2) | fieldformat medDur2 = tostring(medDur2,"duration") ]

it is supposed to rendered in a simpleresultstable like so:

medDur | medDur2
01:20:00 | 00:01:20

but it's rendering medDur2 w/o the duration format like so
medDur | medDur2
01:20:00 | 80

this is happening in both my report and the splunk search form. any help is appreciated. thx

Tags (2)

lguinn2
Legend

Can you do it this way?

index=portal bam="audit" event="userLogout" | 
stats median(secSessDur) as medDur | 
eval medDur = round(medDur) | 
fieldformat medDur = tostring(medDur,"duration") | 
join [search index=portal bam="audit" event="userLogout" | 
stats avg(secSessDur) as medDur2 | 
eval medDur2 = round(medDur2) | fields medDur2 ] |
fieldformat medDur2 = tostring(medDur2,"duration") 

I think this is a kludge, but it might work...

0 Karma
Get Updates on the Splunk Community!

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

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

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...