Installation

Can I download splunkforwarder by using curl ?

okug
New Member

Can I download splunkforwarder by using curl instead of wget?

Thanks,
-- Hiroshi

Labels (1)
Tags (1)
0 Karma
1 Solution

ohoppe
SplunkTrust
SplunkTrust

Hi Hiroshi,

of course you can.

Assuming you want to download splunkforwarder-6.3.3-f44afce176d0-linux-2.6-amd64.deb - you can simply copy paste the wget link that is shown on the download page.

The wget looks like: wget -O splunkforwarder-6.3.3-f44afce176d0-linux-2.6-amd64.deb 'http://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version=...'

Just change the wget -O to curl -L -o
The final command should look like
curl -L -o splunkforwarder-6.3.3-f44afce176d0-linux-2.6-amd64.deb 'http://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version=...'

That's all.

BR
Oliver

View solution in original post

bishopolis
Path Finder

wget https://download.splunk.com/products/splunk/releases/6.6.3/linux/splunkforwarder-6.6.3-e21ee54bc796-...
--2017-10-24 16:44:47-- https://download.splunk.com/products/splunk/releases/6.6.3/linux/splunkforwarder-6.6.3-e21ee54bc796-...
Resolving download.splunk.com (download.splunk.com)... 13.33.151.73, 13.33.151.8, 13.33.151.155, ...
Connecting to download.splunk.com (download.splunk.com)|13.33.151.73|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-10-24 16:44:47 ERROR 404: Not Found.

0 Karma

koshyk
Super Champion

Just updated or copy-paste purposes

product="splunk"       # values can be : splunk , universalforwarder
version="6.6.3"        # Splunk product Version
hash="e21ee54bc796"    # specific per Version
arch="amd64"           # values can be : x86_64 (redhat, tgz), amd64 (ubuntu), x64 (Windows)
os="linux"             # values can be : linux, windows
pkg="deb"              # Values can be : tgz, rpm, deb, msi

if [ $pkg = "tgz" ]; then
   filename="${product}-${version}-${hash}-Linux-${arch}.${pkg}"
elif [ $os = "windows" ]; then
   filename="${product}-${version}-${hash}-${arch}-release.${pkg}"
else 
   filename="${product}-${version}-${hash}-${os}-2.6-${arch}.${pkg}"
fi

md5File="${filename}.md5"
echo $filename         # Verify this is correct

wget "https://download.splunk.com/products/splunk/releases/${version}/${os}/${md5File}"
wget "https://download.splunk.com/products/splunk/releases/${version}/${os}/${filename}"


# OR
curl -o "$md5File" "https://download.splunk.com/products/splunk/releases/${version}/${os}/${md5File}"
curl -o "$md5File" "https://download.splunk.com/products/splunk/releases/${version}/${os}/${filename}"
0 Karma

ohoppe
SplunkTrust
SplunkTrust

Hi Hiroshi,

of course you can.

Assuming you want to download splunkforwarder-6.3.3-f44afce176d0-linux-2.6-amd64.deb - you can simply copy paste the wget link that is shown on the download page.

The wget looks like: wget -O splunkforwarder-6.3.3-f44afce176d0-linux-2.6-amd64.deb 'http://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version=...'

Just change the wget -O to curl -L -o
The final command should look like
curl -L -o splunkforwarder-6.3.3-f44afce176d0-linux-2.6-amd64.deb 'http://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version=...'

That's all.

BR
Oliver

okug
New Member

Great! I tried without -L option.
Thanks Oliver!

-- Hiroshi

0 Karma

ohoppe
SplunkTrust
SplunkTrust

Please accept my answer.

0 Karma
Get Updates on the Splunk Community!

The Splunk Success Framework: Your Guide to Successful Splunk Implementations

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

Splunk Training for All: Meet Aspiring Cybersecurity Analyst, Marc Alicea

Splunk Education believes in the value of training and certification in today’s rapidly-changing data-driven ...

Investigate Security and Threat Detection with VirusTotal and Splunk Integration

As security threats and their complexities surge, security analysts deal with increased challenges and ...