Splunk Search

Divide a value of microseconds to seconds

dperry
Communicator

I have an event that has a value pair called GetMyPortalTime:

  • 698026 [15/Jul/2014:10:47:40 -0700] "GET /wps/myportal HTTP/1.1" 200 254836 TS:1 WAS:tstgpvwp02.octfcu.org:10053 TIME:1312414

The time:1312414 is microseconds. When I run the following:
index=web_logging sourcetype=web_access| timechart avg(GetMyPortalTime)

the time shows values as:
186631.534483
145745.235474
235465.586456

How do I divide these values by 1000000 to covert it to show seconds? I try the following search:
index=web_logging sourcetype=web_access| timechart avg(GetMyPortalTime/1000000)

but it doesn't like it, any suggestions?

Tags (3)
1 Solution

somesoni2
Revered Legend

Try this

index=web_logging sourcetype=web_access | eval GetMyPortalTime=GetMyPortalTime/1000000| timechart avg(GetMyPortalTime)

View solution in original post

dperry
Communicator

my apologies, it is microseconds

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Are you sure that's in milliseconds? Dividing by 1,000,000 suggests microseconds.

0 Karma

somesoni2
Revered Legend

Try this

index=web_logging sourcetype=web_access | eval GetMyPortalTime=GetMyPortalTime/1000000| timechart avg(GetMyPortalTime)

dperry
Communicator

This worked! Thank you

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...