Splunk Search

How to debug a script based lookup?

psobisch
Path Finder

Hello guys,

I have a lookup script, which do not runs in splunk search (doing on the search head). I will only get a:

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

Well, I would expect to see any error messages somewhere inside of the logs (/opt/splunk/var/log/splunk/). But I couldn't find anything. Do you have any Idea where I can look for it?

Regards,
Peter

Tags (3)
0 Karma

Ayn
Legend

By default it's not recorded anywhere. What you could do is redirect your script's stderr output to a file and look there:

f = open("/path/to/some/file","w")
sys.stderr = f

psobisch
Path Finder

works, thanks!

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...