Splunk Search

How to search the number of bytes sent/received by top 5 IP addresses in my fortigate firewall?

pierra56
Explorer

I'm blocking.

I would like to appear in the form of a graph or table, the number of bytes that my top 5 IP addresses consume. I do not understand exactly what is meant by the "count" in variable "sent" to fortigate log. Have you any idea?

1 Solution

somesoni2
Revered Legend

How about this?

sourcetype=mynetworkdata | stats sum(sent_bytes) as send sum(rcvd_bytes) as receive by src_ip_addr (column 1) | sort - send,receive | head 5

View solution in original post

somesoni2
Revered Legend

How about this?

sourcetype=mynetworkdata | stats sum(sent_bytes) as send sum(rcvd_bytes) as receive by src_ip_addr (column 1) | sort - send,receive | head 5

pierra56
Explorer

Thx for your response.
I would like to add another column. It is the separator to use ? this "|"
for exemple:
sourcetype=mynetworkdata |
stats sum(sent_bytes) as send by src_ip_addr (column 1) | sort - send
stats sum(rcvd_bytes) as receive by src_ip_addr (column 2) | sort - receive
| head 5

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

I was with you until you started asking about "count", as that comes with no context. The first part of your question is probably:

sourcetype=mynetworkdata | stats sum(bytes) as bytes by src_ip_addr | sort - bytes | head 5

somesoni2
Revered Legend

You're looking for a search query to get the information which can be used in form of table graph? (the command line in the question is just confusiong).

Have a look at this as well. http://answers.splunk.com/answers/138212/top-10-ip-along-w-top-4-ports

Get Updates on the Splunk Community!

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...