Splunk Search

How to get top ip address in access_log ?

bumbumndb
New Member

My data same :

Jul 24 19:49:59 mydomain.com httpd[9058]: [error] [client 10.254.53.13] Directory index forbidden by Options directive: /var/www/html/

Jul 24 19:49:59 mydomain.com httpd[9044]: [error] [client 10.254.53.14] Directory index forbidden by Options directive: /var/www/html/

Jul 24 19:49:59 mydomain.com httpd[9056]: [error] [client 10.254.53.15] Directory index forbidden by Options directive: /var/www/html/

How I can get IP [ 10.245.53.13 ] and get number of Ip address on column
Like :
ip_list count
10.254.53.13 123
10.254.53.14 10
10.254.53.15 5

Tags (3)
0 Karma

Ayn
Legend

Do you have the IP number extracted as a field? If you do, and we'll say it's called ip, it's as easy as

... | top ip
0 Karma

bumbumndb
New Member

Thanks your help . I got it

0 Karma

Ayn
Legend

Either use the interactive field extractor (click on the arrow by the events, choose "Extract fields..."), alternatively you could add an extraction as part of your search:

... | rex "\[client (?<ip>.+?)\]" | top ip
0 Karma

bumbumndb
New Member

I don't know how to extract IP address to field ? Can help me figure out ? Thanks

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...