Splunk Search

Trouble converting time (epoch) when using timechart

dpoon
Explorer

I can't seem to convert epoch time when using timechart. I'm trying to get each users first logon of the day over a period of time. Here's my search:

sourcetype="wineventlog:security" NOT Account_Name="*$" EventCode=4624 | timechart span=1d min(_time) as FirstLogon by user | convert ctime(FirstLogon)

I could use a fresh set of eyes on this. Any help would be appreciated!

0 Karma
1 Solution

somesoni2
Revered Legend

Try this

 sourcetype="wineventlog:security" NOT Account_Name="*$" EventCode=4624| eval FirstLogon=strftime(_time, "%m/%d/%y %H:%M:%S")| timechart span=5m last(FirstLogon) as FirstLogon by user 

View solution in original post

somesoni2
Revered Legend

Try this

 sourcetype="wineventlog:security" NOT Account_Name="*$" EventCode=4624| eval FirstLogon=strftime(_time, "%m/%d/%y %H:%M:%S")| timechart span=5m last(FirstLogon) as FirstLogon by user 

somesoni2
Revered Legend

My bad, I overlooked it. Will update the answer.

0 Karma

dpoon
Explorer

Thank you. Got it working, but had to use 'last(FirstLogon)' instead of 'first(FirstLogon)' since first was pulling the latest logon of the day.

0 Karma

dpoon
Explorer

I'm using 6.0

0 Karma

linu1988
Champion

which version of splunk are you using?

0 Karma
Get Updates on the Splunk Community!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...