Defining a lookup definition

Though you can access a lookup immediately by the filename, defining the lookup allows you to set other options, reuse the same file, and later make the lookup run automatically. Creating a definition also eliminates a warning message that appears when simply using the filename.

Navigate to Settings | Lookups | Lookup definitions and click on the New button:

Stepping through these fields, we have the following:

sourcetype="impl_splunk_gen_SomeMoreLogs" 
| lookup userslookup user 
| stats count by user city state department 

This will produce results as shown in the following screenshot:

Lookup tables have other features, including wildcard lookups, CIDR lookups, and temporal lookups. We will use those features in later chapters.