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!

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 ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...