Getting Data In

Is there a way to write a script to download the latest Splunk version?

daniel333
Builder

All,

I see there is a "got wget" option on the download page for Splunk, which is great, but that hardcodes me to that version. I am hoping to get something similar that always gets me the latest RPM. Anyone have an idea how I would do this?

0 Karma

davespatz
Explorer

Had the EXACT same issue where I wanted to automate Splunk installs but didn't want to use expect scripts for variable inputs or have to hard code versions and keep the scripts updated - YUK!

You'll want to customize this but to just download the latest version, see URL's below. NO IDEA how long they'll last or if they'll break though. I have case open with Splunk on this now and just found this by tinkering with the URI's - fairly straightforward.

Via PowerShell:
Invoke-WebRequest "https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=**x86_64**&platform=**windows..." -OutFile splunk-latest-installer.msi

Via wget:
wget -O splunk-latest-installer.rpm "https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=**x86_64**&platform=**linux**..."

jkat54
SplunkTrust
SplunkTrust

You'll need a scriptable browser such as phantomJS. You could also use an IE com object if in windows.

Problem is, as soon as you automate the process, splunk will make website changes and break your script 😉

I have seen some people around here who have done it though. It is possible.

This seems to get the latest version of 6.4.0 without having to add the build number;
https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version...

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!

Unlocking Unified Insights: New Gigamon Federated Search App for Splunk

In today’s data-heavy environment, organizations are caught in a data distribution dilemma. As data volumes ...

GA: New Data Management App in Splunk Platform

Streamlining Data Management: Introducing a unified experience in Splunk Managing data at scale shouldn’t feel ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...