Splunk Search

Splunk query on lookups

umeshcreddy
Engager

Hi 

Actually i made  lookup with the list of ip address in .csv file. I want to write a query if there is traffic from the ip address which i had given in the lookups.

Please help me woth the query. i have the Web datamodel as well

 

Thanks & Regards,

Umesh Chandra Reddy 

Labels (1)
0 Karma

ldongradi_SPL
Splunk Employee
Splunk Employee

You don't say where the traffic analysis comes from ... Any index, source, sourcetype ?

Do you want to analyze the activity toward the Splunk Web server itself ? If so, you would start looking in

index=_internal  source=splunkd_access.log sourcetype=splunkd_ui_access clientip=*

Here the clientip is the field that tells you about the incoming connection.

If you want to compare it with the lookup you can then add this :

... | LOOKUP <lookup.csv/lookup definition> clientip OUTPUTNEW clientip AS knownIP

If the ip address is in the csv, then it will be shown in the knownIP field.

If it is unknown, the knownIP field will be inexistent.

After what you can filter the results based on the existence of that knownIP field, with:

| where isnull(knownIP)

or

| where isnotnull(knownIP)

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...

Global Splunk User Group Events: May + June 2026

Your Splunk Community Awaits: Discover Upcoming User Group Events Worldwide    Staying ahead in the fast-paced ...