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!

Enterprise Security Content Update (ESCU) | New Releases

In September, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...