Splunk Search

Error in 'inputlookup' command

terryloar
Path Finder

I get the following error:

"Error in 'inputlookup' command: This command must be the first command of a search."

FOR

source="/home/loart/dev/Splunk/Test_Logs/nepoc_access_small.log" | inputlookup month_year.csv

AND

source="/home/loart/dev/Splunk/Test_Logs/nepoc_access_small.log" | inputlookup month_year

However, inputlookup is indeed the first command, month_year.csv is defined, and month_year is a valid lookup.

Tags (1)

Drainy
Champion

To use inputlookup it must be the first command, e.g.

| inputlookup blah.csv

To use it later in a search you use it like so;

sourcetype=blah | inputlookup append=t blah.csv
Get Updates on the Splunk Community!

Enhance Your Splunk App Development: New Tools & Support

UCC FrameworkAdd-on Builder has been around for quite some time. It helps build Splunk apps faster, but it ...

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...