Command roundup
This section lists several important Splunk commands you will use when working with lookups.
The lookup command
The Splunk lookup
command is used to manually invoke field lookups using a Splunk lookup table that is previously defined. You can use Splunk Web (or the transforms.conf
file) to define your lookups.
If you do not specify OUTPUT
or OUTPUTNEW
, all fields in the lookup table (excluding the lookup match field) will be used by Splunk as output fields. Conversely, if OUTPUT
is specified, the output lookup fields will overwrite existing fields and if OUTPUTNEW
is specified, the lookup will not be performed for events in which the output fields already exist.
For example, if you have a lookup table specified as iptousername
with (at least) two fields, IP
and UserId
, for each event, Splunk will look up the value of the field IP
in the table and for any entries that match, the value of the UserId
field in the lookup table will be written to the field user_name
in the event...