Splunk Search

How do I create a list of unique IPs from an access log file to compare to a Audit log event?

deansapp
New Member

I have some web access logs that look like this:

10.0.0.134 - - [31/Aug/2017:08:07:40 -0600] "GET /images/MXALoginBG.jpg HTTP/1.1" 200 54665 "https://prod.MXA.com/" "Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0"

And I need to get all of the unique IPs listed into a single list so I can look them up and determine where they are from and if the same user and corresponding login event in the Audit logs were authorized (below)

8   1418168577  2   bob.smithi  91.76.169.010   allowed /login.php

Any recommendations on how to do this?

0 Karma

thambisetty
SplunkTrust
SplunkTrust

index=audit_logs [search index=access_logs | dedup src | table src | format src]

Make sure that you have ip field renamed to src in both the sources.

Sub search will produce unique src ips and will be given input to audit logs to find the matches.

————————————
If this helps, give a like below.
0 Karma
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 ...