This documentation does not apply to the most recent version of Splunk. Click here for the latest version.
Loads search results from a specified static lookup table.
inputlookup [required=<bool>] [append=<bool>] [start=<int>] [max=<int>] (<filename> | <tablename>)
- Syntax: <string>
- Description: The name of the lookup file (must end with .csv or .csv.gz).
- Syntax: <string>
- Description: The name of the lookup table as specified by a stanza name in transforms.conf.
- Syntax: append=<bool>
- Description: If set to true, the data from the lookup file is appended to the current set of results rather than replacing it. Defaults to false.
- Syntax max=<int>
- Description: Specify the maximum number of events to be read from the file. Defaults to 1000000000.
- Syntax: Specify whether the lookup table must exist for the search to proceed. If set to false, the search proceeds and Splunk generates a warning message. Defaults to true.
- Syntax: start=<int>
- Description: Specify the 0-based offset of the first event to read. If
start=0, it begins with the first event. If
start=4, it begins with the fifth event. Defaults to 0.
Reads in lookup table as specified by a filename (must end with .csv or .csv.gz) or a table name (as specified by a stanza name in transforms.conf). If 'append' is set to true (false by default), the data from the lookup file is appended to the current set of results rathering than replacing it.
Example 1: Read in "usertogroup" lookup table (as specified in transforms.conf).
| inputlookup usertogroup
Example 2: Same as example2 except that the data from the lookup table is appended to any current results.
| inputlookup append=t usertogroup
Example 3: Read in "users.csv" lookup file (under $SPLUNK_HOME/etc/system/lookups or $SPLUNK_HOME/etc/apps/*/lookups).
| inputlookup users.csv
Have questions? Visit Splunk Answers and see what questions and answers the Splunk community has using the inputlookup command.