Splunk Search

How to search for a list of hosts and the count of events that have been indexed per day for each host?

dolejh76
Communicator

I am sure that this has been asked and answered but I cant find a format that gives me what I am looking for.

I would like to get a list of hosts and the count of events per day from that host that have been indexed. Essentially I would like to take this to management and show ROI that looks at the millions of events each day from these hosts that have been indexed.

So it would show

Hosts 12/1 12/2 12/3 12/4 (last 7 or 30 days)
Host1 xxxx xxxx xxxx xxxx
Host 2 xxxx xxxx xxxx xxxx
Firewall xxxx xxxx xxxx xxxx
etc

xxxx = number of events indexed

Any help is appreciated - thanks

Tags (4)
0 Karma
1 Solution

MuS
Legend

Hi dolejh76,

try something like this:

your base search here | timechart span=1d count by host

hope it helps ...

cheers, MuS

View solution in original post

yannK
Splunk Employee
Splunk Employee

If you prefer the other way, (date at columns, rows as hosts )

< mysearch >  | bucket _time span=1d  
|convert ctime(_time) AS date timeformat="%Y/%m/%d" 
| chart count over host by date

MuS
Legend

Hi dolejh76,

try something like this:

your base search here | timechart span=1d count by host

hope it helps ...

cheers, MuS

dolejh76
Communicator

That helped thanks - one more for you - what about size in KB for the same data? This way I can show how much of our license each host is chewing up per day?

Thanks
John

0 Karma

MuS
Legend

Sure, on your license master search the internal index for the source license_usage.log like this:

index=_internal source="*license_usage.log" | timechart span=1d sum(eval(b/1024)) AS KB by h | rename h AS host

cheers, MuS

dolejh76
Communicator

I like this report - unfortunately... there is a NULL field that has a considerable amount of data usage? Any idea what that would be? At this point we are ONLY pulling in wineventlogs and AD data - so it shouldn't be this high...

Looks like there is an "OTHER" Field as well.... so what is "OTHER" and "NULL"

Thanks
JD

0 Karma

MuS
Legend
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...