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
Path Finder

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
Path Finder

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
Path Finder

Please accept my answer.

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...