Splunk Search

Creating a detailed table to investigate user account logging into several servers

rcastello
Explorer

Hello,

I'm attempting to build a detailed table complete with timestamp, account name, eventcode, and host. We found that there is an account logging into various servers over a period of 48 hours, but I'm having difficulty creating a proper query. The only column that is filled out is host. Here is what I attempted:

index="index" Account_Name="account" EventCode="event code" | stats count BY host | eval timestamp=strftime(_time, "%B %d, %D:%M:%S %p") | table timestamp Account_Name host eventcode

Thank you for any help the community can provide.

0 Karma

to4kawa
Ultra Champion
index="index" Account_Name="account" EventCode="event code" 
| stats count last(_time) as _time by Account_Name host EventCode
| eval timestamp=strftime(_time, "%B %d, %H:%M:%S %p")
| table timestamp Account_Name host EventCode

Hi, @rcastello
Is this result what you want to know?

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...