Splunk Search

Total Logon Count for Each month

carlyleadmin
Contributor

Hello Splunk Gurus

I need help with the following. I am sure it is pretty simple command but my head stopped working. i have the following search that brings up the total logon count in 1month span in table format for the last 2 months. How do i create a chart or timechart from this? (total number of logons by each month)

Message="An account was successfully logged on." | bucket _time span=30d | search Message="An account was successfully logged on." AND Source_Port="0"|stats count(Message) AS "Total_Logon_Count" by _time | convert timeformat="%B %d %Y" ctime(_time) | rename _time AS Date |table Date Total_Logon_Count

alt text

thanks in advance for all the help!

Tags (1)
0 Karma
1 Solution

jimmytpowers
Path Finder

You should consider reworking your search using the timechart command instead of table and stats:

https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Timechart?r=searchtip

Once this is done, Returned statistics can be displayed as a visualization via the GUI, you can find information about that here :

https://docs.splunk.com/Documentation/Splunk/7.3.0/SearchTutorial/Chartasareport

View solution in original post

0 Karma

jimmytpowers
Path Finder

You should consider reworking your search using the timechart command instead of table and stats:

https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Timechart?r=searchtip

Once this is done, Returned statistics can be displayed as a visualization via the GUI, you can find information about that here :

https://docs.splunk.com/Documentation/Splunk/7.3.0/SearchTutorial/Chartasareport

0 Karma

carlyleadmin
Contributor

Thanks Jimmy

0 Karma

jimmytpowers
Path Finder

You are very welcome!

0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...