Splunk Search

need to know a rough idea of how many times something occurred

frussell
New Member

As a system administrator, sometime I only need to know a rough idea of how many times something occurred. For example, if I'm looking to see how many times a file has been served by Apache - but I'm looking at millions of hits over the course of a few weeks - I don't need to know exactly how many, I'm just looking for a trend on when it started.

Tags (1)
0 Karma

Lowell
Super Champion

Check out the timechart and/or bucket commands. Splunk doesn't really have any concept of just giving you an "rough idea", you have to look at all the results. One exception may be if you can find the trends you are looking for by looking just at your indexing volume metrics, which sometimes works, but that can be more tricky and there are some gotchas.

If you are looking at finding trends long term, then summary indexing is certainly the recommended way to go with this kind of thing. Otherwise, you simply have to run a very long running search.

A simple count by time period search would be something like:

sourcetype=access_log | timechart count span=1h

Keep in mind that this is essentially the same thing that the default time-line shows you in the default search view. I often find that it does a good enough job for many simple trends, but you can use the search above to get a more precise picture.

Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

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

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...