Splunk Search

Trying to search a connections log, top 10 hosts sending the most traffic, doesn't seem to be working.

howardsamuels
New Member

Trying to search a connections log, top 10 hosts sending the most traffic, need some help, thanks.

Tags (1)
0 Karma

DEAD_BEEF
Builder
index=your_index | stats count by host sum(bytes_out) AS "Bytes Out" | sort -count limit=10
0 Karma

DalJeanis
Legend

@howardsamuels - The general answer to this type of question is

1) Find a single record of the type you want
2) craft a stats query to add it up the way you want it.

However, @niketnilay has provided three other viable methods, depending on what you are trying to achieve and what information is on your system.

The first thing to do is to specify what, exactly, you want to know.

0 Karma

niketn
Legend

@howardsamuels, for the community to assist you, you definitely need to add more details like what is the current search you have tried? What does your data look like in connections log? What does most traffic refer to (more no of events or more amount of data based on size)?

If your host ingests data to Splunk index, can you use metadata, tstats or eventcount command to get the number of events per host?

https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Eventcount
http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Metadata
https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Tstats

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...