Splunk Search

Why am I getting lookup search error "[server x] Script for lookup table 'user_agents' returned error code 1. Results may be incorrect"?

cdcproject
New Member

We are using Splunk version 6.3 and facing an issue with a lookup table. While running the search, it returns below errors. FYI: we have defined the lookup table on a search head.

Search:

index=sample sourcetype=data referer="https://example.com/" | lookup user_agents user_agent | chart count by ua_family

Error:

[indexer 1] Script for lookup table 'user_agents' returned error code 1. Results may be incorrect.
[indexer 2] Script for lookup table 'user_agents' returned error code 1. Results may be incorrect.

Thanks,
raj

0 Karma

marhuc
Explorer

You should add local=true to your lookup command. It indicates that loookup table is defined on searchhead:

index=sample sourcetype=data referer="https://example.com/" | lookup local=true user_agents user_agent | chart count by ua_family
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...