
Lookup definitions: Lookup definitions help to edit existing lookup definitions or define a new file-based lookup. Refer to the below screenshot to get a better understanding.Ģ.
» Under Destination filename, name the file product. » Upload a lookup file, browse for the CSV file (product.csv) to upload. To create a lookup table file, you need to follow the below steps: When you click on ‘Add new’ view, you can upload CSV files to use in your field lookups. Lookup table files : In lookup table files, you can simply upload a new file. Let us get into more details and understand these different ways:ġ. There are 3 ways to create and configure Splunk lookups:
#SPLUNK JOIN 2 SEARCHES HOW TO#
Refer to the screenshot on the left to get a better understanding on how to create Splunk lookup. You can create new lookups or edit the existing lookups. Once you click on ‘Lookups’, a new page will be displayed saying ‘Create and configure lookups’. It matches your events in a KMZ file and outputs fields to your event encoded in a KMZ, like country, state or county names.
Geospatial Lookup: In this type of lookup, the data source is a KMZ (compressed keyhole markup language) file which is used to define boundaries of mapped regions such as US states and US counties. This lookup matches the fields in your event to fields in a KV store. KV Store Lookup : In this type of lookup, it populates your event data with fields pulled from your App Key Value Store (KV Store) collections. Therefore, it is also called as “Scripted lookup”. It can use Python scripts or binary executable to get field values from an external source. External Lookup : In this type of lookup, it populates your event data from an external source, say a DNS server. They can have multiple instances of the same value. There must be at least two columns representing field with a set of values.
Therefore, it is also called as a “static lookup”. It populates the event data with fields and represents it in the static table of data.
CSV Lookup : As the name itself says, a CSV lookup pulls data from CSV files. If you see the image below, these are the different types of Splunk lookup which I will be explaining in detail below. It can translate fields into more meaningful information at search time. Splunk lookup command can accept multiple event fields and destfields.
It enriches the data while comparing different event fields.Splunk Lookup helps you in adding a field from an external source based on the value that matches your field in the event data.
A lookup table is a mapping of keys and values. Suppose you have product_id=2 and the name of the product is present in a different file, then Splunk lookup will create a new field – ‘product_name’ which has the ‘product_id’ associated with it. Lookup can help you to map the details of the product in a new field. For example, you have a product_id value which matches its definition in a different file, say a CSV file. You might be familiar with lookups in Excel. So, let’s get started with Splunk Lookup. I have also explained how these fields can be extracted in different ways. On the other hand, Splunk fields help in enriching your data by providing a specific value to an event. I will discuss why lookups are important and how you can associate data from an external source by matching the unique key value. In this blog, I am going to explain the following concept – Splunk lookup, fields and field extraction. In my previous blog, I explained Splunk Events, Event types and Tags that help in simplifying your searches.