Splunk Search

How to update a lookuptable?

Abass42
Communicator

So I couldn't find anything in splunk community that answers my question about pushing an update to a lookup table. I manually updated the .csv file through the backend searchhead server. I deleted a line and replaced it with another hostname. 

 

When i run the command:

 

 

 

|inputlookup dns_hosts.csv| stats count by host|eval count=0|join host type=outer [ search index="dns"|stats count by host]|fillnull|where count=0|fields  host count

 

 

 

Im still getting the host that has a count of 0, the host that i removed in the csv file. My question is do i need to restart the searchhead to push that change? I didnt change any config files, just the lookupfile under the specific app directory's lookup file folder. I wasnt sure if splunk would automatically read the updated file after a certain amount of time, or if i needed to restart the server for it to take effect? And will that file replicate across all searchheads after I restart it? 

Thank you for any guidance. 

Labels (1)
Tags (2)
0 Karma

somesoni2
Revered Legend

Splunkbase has a great app for updating lookup table from UI.

https://splunkbase.splunk.com/app/1724

This uses REST APIs I believe so updates do not require refresh/restart. Check that app out.

0 Karma

PickleRick
SplunkTrust
SplunkTrust

That's another story 😉 But yes, the app is quite useful (even if a bit clunky).

0 Karma

PickleRick
SplunkTrust
SplunkTrust

1) If you do manual changes to the files on splunk nodes, sometimes they get reloaded on their own, sometimes they don't (they usually do in the end but it may take some time). It's better to force a refresh. See https://community.splunk.com/t5/Security/When-you-run-debug-refresh-what-does-it-refresh/m-p/610498

Some settings however are never applied without full restart.

2) If you have a search-head cluster, you should push your changes via the deployer. If however you have several non-connected search-heads, you have to apply the config change to each one of them. Either manually or - if you're using deployment server - by distributing new version of an app via DS.

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Event Series: Splunk Observability Metrics Cost Optimization

Balancing Scale and Spend: Gaining Control Over High-Volume Metrics in Splunk Observability Cloud As ...

Kick the Tires Before You Commit: A Hands-On Tour of the Splunk Observability Cloud ...

Evaluating an enterprise observability platform usually goes like this: fill out a form, get a free trial with ...

Deep insights, no barriers: Splunk Observability Cloud Free Edition

As software delivery cycles continue to accelerate, observability shouldn’t be a luxury — it should be a ...