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!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...

Update Your SOAR Apps for Python 3.13: What Community Developers Need to Know

To Community SOAR App Developers - we're reaching out with an important update regarding Python 3.9's ...

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 ...