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!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...