Getting Data In

Need help creating/configuring CSV lookup

jcorkey
Explorer

I know that using inputlookup will use a CSV file but is it possible to have a script create the CSV file that inputlookup will use?

I know I can use a scripted lookup but this requires arguments to be passed into the script when all I want is a script to create a CSV for me that inputlookup will then use

For example, a stanza in the transforms.conf for a CSV lookup might be as follows:

[listofspecialusers]
filename = specialusers.csv

instead of that could I do something like this below:

[listofspecialusers]
filename = scriptToCreateSpecialUsersCSV.py

So then that python script will create my CSV instead of already having a CSV file created to list in the stanza.

how can I accomplish this??

0 Karma

hardikJsheth
Motivator

You don't need python reference in transforms.conf. You can keep your transforms.conf configuration as it is.

Create a scripted input which runs periodically and put data into the csv file within your lookup table.

0 Karma

jcorkey
Explorer

Is there a way to have the script run whenever the search is ran which will then populate the CSV and then use the CSV in the search rather than have it scheduled periodically?

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 ...