Splunk Search

How to show count of events per day dbconnect

kbcuait
Explorer

Hi, here's my search, which includes a conversion from epoch time to a Y-d-m time format:

| dbquery "DBNAME" "SELECT useraction FROM usertable" | eval useraction=strftime(useraction,"%Y-%d-%m")

Now I'd like to see how many events occurred for each day

0 Karma
1 Solution

kbcuait
Explorer

Ok I think I answered my own question - was simpler than I thought (must have just been missing something small):

| dbquery "DBNAME" "SELECT useraction FROM usertable" | eval useraction=strftime(useraction,"%Y-%d-%m") | stats count by useraction

View solution in original post

0 Karma

kbcuait
Explorer

Ok I think I answered my own question - was simpler than I thought (must have just been missing something small):

| dbquery "DBNAME" "SELECT useraction FROM usertable" | eval useraction=strftime(useraction,"%Y-%d-%m") | stats count by useraction

0 Karma
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...