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!

Splunk Cloud | Empowering Splunk Administrators with Admin Config Service (ACS)

Greetings, Splunk Cloud Admins and Splunk enthusiasts! The Admin Configuration Service (ACS) team is excited ...

Tech Talk | One Log to Rule Them All

One log to rule them all: how you can centralize your troubleshooting with Splunk logs We know how important ...

Splunk Security Content for Threat Detection & Response, Q1 Roundup

Join Principal Threat Researcher, Michael Haag, as he walks through:An introduction to the Splunk Threat ...