Splunk Search

Use a lookup file to show IP name

WXY
Path Finder

Hello,I have a csv file ,and I use it as a lookup table, it has two fields : IP,IP Name;

| inputlookup ip_name.csv

and my data has source_ip, the source_ip corresponds to the IP in csv file.
I want to show a table such as : source_ip,IP Name
how do I write the SPL?

Tags (2)
0 Karma

renjith_nair
Legend

@WXY,

"your search to get source_ip" |lookup ip_name.csv IP AS source_ip

Reference : http://docs.splunk.com/Documentation/Splunk/7.2.0/SearchReference/Lookup

Run anywhere example:

    |makeresults |eval ISO="Austria"|lookup geo_attr_countries.csv country as ISO
---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...