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!

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