Splunk Search

need to build an automation to import CSV from below mentioned github location into Splunk lookup file

Zoe_
Observer

anybody have experience for building an automation to import CSV from  github location into Splunk lookup file, CSV files are constantly changing, and I need to automate daily updates

Labels (1)
0 Karma

livehybrid
SplunkTrust
SplunkTrust

Hi @Zoe_ 

You may find the Webtools Add-on helpful here, you can use the custom curl command in the app to request your data and then parse it into a table, then use outputlookup to save it.

Here is an example I have used previously:

livehybrid_0-1745396823955.png

The SPL for this is:

| curl uri=https://raw.githubusercontent.com/livehybrid/TA-aws-trusted-advisor/refs/heads/main/package/lookups/trusted_advisor_checks.csv 
| rex field=curl_message max_match=1000 "(?<data>.+)\n?" 
| mvexpand data
| fields data
| rex field=data "^(?<id>[^,]+),(?<name>\"[^\"]+\"|[^,]+),(?<category>\"[^\"]+\"|[^,]+),(?<description>\".*\"|[^,]+)$"
| fields - data

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

@livehybrid- This curl tool sounds useful.

And @Zoe_  you just need to add | outputlookup <your-lookup-name> at the end of @livehybrid 's query.

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...