Splunk Search

How can I upload & Replace lookup files on a weekly basis?

srw46
Path Finder

Hi guys,

I'm using a lookup table that is subject to the occasionally change. I've been trying to setup a weekly job to replace the existing file with a newer version but the batch job fails on 'access denied' because the file is apparently in use (by Splunk).

I'm trying to drop the csv file right on top of the other one and overwrite in \etc\apps\search\lookups

Is there anyway I can get around this or another angle I should take? Many thanks,

Tags (1)
2 Solutions

dwaddle
SplunkTrust
SplunkTrust

I've not known Splunk to lock lookup files, even while in use during a search. Is this on a Unix or a Windows indexer?

Best practice in this situation would probably be a multiple-setup process

  1. Upload new lookup under a temporary name
  2. Rename existing lookup to a different name
  3. Rename new lookup to the "correct" name
  4. Delete the old lookup

These steps make your change more likely to be atomic and less likely to impact searches that are running during your update or that start while your update is happening.

View solution in original post

srw46
Path Finder

Thanks I'll try these steps and report back. I assumed that if the file was locked then I wouldn't be able to rename either. It's a Windows server.

I was fairly certain credentials were in place but I'll investigate that again first if you feel Splunk shouldn't be locking the file.

View solution in original post

0 Karma

srw46
Path Finder

Thanks I'll try these steps and report back. I assumed that if the file was locked then I wouldn't be able to rename either. It's a Windows server.

I was fairly certain credentials were in place but I'll investigate that again first if you feel Splunk shouldn't be locking the file.

0 Karma

dwaddle
SplunkTrust
SplunkTrust

I've not known Splunk to lock lookup files, even while in use during a search. Is this on a Unix or a Windows indexer?

Best practice in this situation would probably be a multiple-setup process

  1. Upload new lookup under a temporary name
  2. Rename existing lookup to a different name
  3. Rename new lookup to the "correct" name
  4. Delete the old lookup

These steps make your change more likely to be atomic and less likely to impact searches that are running during your update or that start while your update is happening.

Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...